/** * Need to delete associated records. * * @see CActiveRecord::beforeDelete() */ protected function beforeDelete() { OphTrOperationnote_OperationAnaestheticAgent::model()->deleteAllByAttributes(array('et_ophtroperationnote_anaesthetic_id' => $this->id)); OphTrOperationnote_AnaestheticComplication::model()->deleteAllByAttributes(array('et_ophtroperationnote_anaesthetic_id' => $this->id)); return parent::beforeDelete(); }
/** * Need to delete associated records. * * @see CActiveRecord::beforeDelete() */ protected function beforeDelete() { OphTrOperationnote_OperationDrug::model()->deleteAllByAttributes(array('ophtroperationnote_postop_drugs_id' => $this->id)); return parent::beforeDelete(); }