public function afterSave($args) { parent::afterSave($args); $db = get_db(); $this->_deleteAuxParams($db); $this->_saveAuxParams($db); }
protected function afterSave($args) { if (!empty($this->_relation)) { if ($this->_isSubject) { $this->_relation->subject_id = $this->id; } else { $this->_relation->object_id = $this->id; } $this->_relation->save(); } parent::afterSave($args); }