I’m on the yii api document, there’s a method named saveAttributes() used to update a couple of fields. my situation is just update a specific field status through this method.
ModelName::model()->findByPk($id)->saveAttributes(array('status' => 1));
but seems saveAttributes didn’t invoke beforeSave() method in the model, so what’s the best solution to do this?
http://www.yiiframework.com/doc/api/1.1/CActiveRecord/#saveAttributes-detail