예제 #1
0
 /**
  * Persist foreign model & link.
  *
  * @return void
  */
 public function store()
 {
     $this->_primaryTableRow->person_id = $this->_model->store();
     parent::store();
 }
예제 #2
0
 /**
  * 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();
     }
 }