I have a huge data set that’s coming in, and I need to either update a record or create a new one using a db index.
In MySQL it would be as simple as
INSERT INTO table VALUES val1, val2, val3 ON DUPLICATE KEY UPDATE val1 = something;
However, I can’t seem to find a way to do this in CakePHP. Is there some way or do I need to use a raw query for this?