AR isNewRecord and AfterSave

In CActiveRecord class the attribute isNewRecord is set to false after the method afterSave(). Why? In my code in afterSave() method I expect this attribute to be already false, but it is not. E.g, I need to update some attributes of the model after this model is saved, and for this operation I use model's id which is set only after the model is saved.

This is done purposely so that in afterSave(), you can tell whether it is called in an insert() or update(). You can explicitly set this property to be false if you want in afterSave().

If you expect it to be false, just assume it - it would be false in any case!

Yes, I get it, thanks and sorry :)