Beispiel #1
0
 /**
  * Filter the query by a related \Engine\Actor object
  *
  * @param \Engine\Actor|ObjectCollection $actor  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMovieQuery The current query, for fluid interface
  */
 public function filterByActor($actor, $comparison = null)
 {
     if ($actor instanceof \Engine\Actor) {
         return $this->addUsingAlias(MovieTableMap::ID, $actor->getMovieId(), $comparison);
     } elseif ($actor instanceof ObjectCollection) {
         return $this->useActorQuery()->filterByPrimaryKeys($actor->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByActor() only accepts arguments of type \\Engine\\Actor or Collection');
     }
 }
Beispiel #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildActor $actor Object to remove from the list of results
  *
  * @return ChildActorQuery The current query, for fluid interface
  */
 public function prune($actor = null)
 {
     if ($actor) {
         $this->addUsingAlias(ActorTableMap::ID, $actor->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }