/** * Persist foreign model & link. * * @return void */ public function store() { $this->_primaryTableRow->person_id = $this->_model->store(); parent::store(); }
/** * Persist foreign model & link. * * @return void */ public function store() { $this->_primaryTableRow->role_id = $this->_model->store(); // only store if something has changed // this avoids duplicate entries if ($this->getId() !== $this->_primaryTableRow->role_id) { parent::store(); } }