IOTL, the main causes for the Mexican-American War of the 1840's were a dispute over the texan border and the mexican government's refusal to sell California to the US for $30 million.
But is there any way the mexicans could realize that trying to hold on to California was a pain by that point and that going to war with the US was a bad idea?
If California is sold instead of conquered, will the mexicans hold on to more territory in the area than they were left with IOTL? I'm under the impression that the mexicans could keep San Diego.