Bug? Scenario Always Set To 'update' After Save.

I understand the logic that the default scenario on new models is ‘insert’ and the default on existing models is ‘update’. However, I am setting a different scenario manually, but after saveing it still gets set to ‘update’.

Is this intended behaviour? Maybe just have it set it as ‘update’ only if the scenario is ‘insert’ but leave it if it’s something else (i.e. manually set). Thoughts?

I’m with a similar problem. You found some solution?

Thanks

It is an intended behaviour. From documentation of insert() method of ActiveRecord


After the record is inserted to DB successfully, its isNewRecord property will be set false,

and its scenario property will be set to be 'update'.