Updating calculated gridview field
This property is also used by save() internally as follows: Because yii\db\Active Record extends from yii\base\Model, it shares the same data validation feature.
You can also call yii\db\Active Record::mark Attribute Dirty() to explicitly mark an attribute as dirty.
Active Record provides an object-oriented interface for accessing and manipulating data stored in databases.
An Active Record class is associated with a database table, an Active Record instance corresponds to a row of that table, and an of an Active Record instance represents the value of a particular column in that row.
When you call save(), by default it will call validate() automatically.
Only when the validation passes, will it actually save the data; otherwise it will simply return Like normal models, Active Record instances also enjoy the massive assignment feature.