Can any one from Yii core team answer why you did not include support for ‘insert on duplicate update’ feature into active record. This is really lightweight, useful and in my case musthave feature. I checked if other frameworks have it, and looks like laravel, main competitor, have it. Adding this feature is not so hard actually.
In my experience, model logic typically requires a clear distinction between new and already saved records. It’s very common to use a different set of validation rules, event handlers, etc. on insert and update scenarios. Yii’s built-in model behaviors demonstrate this well, just take a look in their code.
Can you tell a bit more about the actual problem you are trying to solve with ON DUPLICATE KEY UPDATE?