As seen here: CActiveRecord | API Documentation for Yii 1.1 | API Documentation for Yii 1.1 | Yii PHP Framework
Note, validation is not performed in this method. You may call validate to perform the validation.
This is like a massive hole with regard to data integrity. Would a patch be accepted, or could it break too much?
Probably not possible to change without changing the update() function signature.
samdark
(Alexander Makarov)
3
Yes, that would break behavior that is relied on.
Hello, if I may jump in: you need to call save(). Internally save() eventually calls update().
update method is rather dedicated to CDbCommand queries: it is designed and expected to not validate.
Well, in Yii 2 update() does validate. There’s a difference there.
1 Like