コード例 #1
0
 /**
  * Declares an association between this object and a Genre object.
  *
  * @param      Genre $v
  * @return     Moviesgenres The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setGenre(Genre $v = null)
 {
     if ($v === null) {
         $this->setGenreid(NULL);
     } else {
         $this->setGenreid($v->getId());
     }
     $this->aGenre = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Genre object, it will not be re-added.
     if ($v !== null) {
         $v->addMoviesgenres($this);
     }
     return $this;
 }