예제 #1
0
 protected function saveAssociation($model, $author)
 {
     // record wish/author association
     $wa = new WishAuthor();
     $wa->wish_id = $model->id;
     $wa->author_id = $author->id;
     $wa->save();
 }
예제 #2
0
파일: Wish.php 프로젝트: stpncpe/cbdbx
 public function removeAuthor($author_id)
 {
     $pk = array('wish_id' => $this->id, 'author_id' => $author_id);
     WishAuthor::model()->deleteByPk($pk);
 }