/** * Filter the query by a related Moviespersons object * * @param Moviespersons $moviespersons the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return PersonFUQuery The current query, for fluid interface */ public function filterByMoviespersons($moviespersons, $comparison = null) { if ($moviespersons instanceof Moviespersons) { return $this->addUsingAlias(PersonFUPeer::ID, $moviespersons->getPersonid(), $comparison); } elseif ($moviespersons instanceof PropelCollection) { return $this->useMoviespersonsQuery()->filterByPrimaryKeys($moviespersons->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByMoviespersons() only accepts arguments of type Moviespersons or PropelCollection'); } }
/** * Associate a Person object to this object * through the moviesPersons cross reference table. * * @param Person $person The Moviespersons object to relate * @return void */ public function addPerson($person) { if ($this->collPersons === null) { $this->initPersons(); } if (!$this->collPersons->contains($person)) { // only add it if the **same** object is not already associated $moviespersons = new Moviespersons(); $moviespersons->setPerson($person); $this->addMoviespersons($moviespersons); $this->collPersons[] = $person; } }
/** * Associate a Movie object to this object * through the moviesPersons cross reference table. * * @param Movie $movie The Moviespersons object to relate * @return void */ public function addMovie($movie) { if ($this->collMovies === null) { $this->initMovies(); } if (!$this->collMovies->contains($movie)) { // only add it if the **same** object is not already associated $moviespersons = new Moviespersons(); $moviespersons->setMovie($movie); $this->addMoviespersons($moviespersons); $this->collMovies[] = $movie; } }
/** * Exclude object from result * * @param Moviespersons $moviespersons Object to remove from the list of results * * @return MoviespersonsQuery The current query, for fluid interface */ public function prune($moviespersons = null) { if ($moviespersons) { $this->addCond('pruneCond0', $this->getAliasedColName(MoviespersonsPeer::MOVIEID), $moviespersons->getMovieid(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(MoviespersonsPeer::PERSONID), $moviespersons->getPersonid(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }