I want to know the answer to the following question:
Which war played a role in ceding San Diego to the United States?
All the background I'm provided with is that "As a result of the Mexican–American War of 1846–48, the territory of Alta California, including San Diego, was ceded to the United States by Mexico, under the terms of the Treaty of Guadalupe Hidalgo in 1848.". Is that enough to answer the question?
Answer: yes