Element_OphTrOperationnote_Anaesthetic::relations PHP Method

relations() public method

public relations ( ) : array
return array relational rules.
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array('element_type' => array(self::HAS_ONE, 'ElementType', 'id', 'on' => "element_type.class_name='" . get_class($this) . "'"), 'eventType' => array(self::BELONGS_TO, 'EventType', 'event_type_id'), 'event' => array(self::BELONGS_TO, 'Event', 'event_id'), 'user' => array(self::BELONGS_TO, 'User', 'created_user_id'), 'usermodified' => array(self::BELONGS_TO, 'User', 'last_modified_user_id'), 'anaesthetic_type' => array(self::BELONGS_TO, 'AnaestheticType', 'anaesthetic_type_id'), 'anaesthetist' => array(self::BELONGS_TO, 'Anaesthetist', 'anaesthetist_id'), 'anaesthetic_delivery' => array(self::BELONGS_TO, 'AnaestheticDelivery', 'anaesthetic_delivery_id'), 'anaesthetic_agent_assignments' => array(self::HAS_MANY, 'OphTrOperationnote_OperationAnaestheticAgent', 'et_ophtroperationnote_anaesthetic_id'), 'anaesthetic_agents' => array(self::HAS_MANY, 'AnaestheticAgent', 'anaesthetic_agent_id', 'through' => 'anaesthetic_agent_assignments'), 'anaesthetic_complication_assignments' => array(self::HAS_MANY, 'OphTrOperationnote_AnaestheticComplication', 'et_ophtroperationnote_anaesthetic_id'), 'anaesthetic_complications' => array(self::HAS_MANY, 'OphTrOperationnote_AnaestheticComplications', 'anaesthetic_complication_id', 'through' => 'anaesthetic_complication_assignments'), 'witness' => array(self::BELONGS_TO, 'User', 'anaesthetic_witness_id'));
    }