Exemplo n.º 1
0
 /**
  * Filter the query by a related EstadoPelicula object
  *
  * @param     EstadoPelicula|PropelCollection $estadoPelicula The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return    PeliculaQuery The current query, for fluid interface
  */
 public function filterByEstadoPelicula($estadoPelicula, $comparison = null)
 {
     if ($estadoPelicula instanceof EstadoPelicula) {
         return $this->addUsingAlias(PeliculaPeer::ESTADO, $estadoPelicula->getId(), $comparison);
     } elseif ($estadoPelicula instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PeliculaPeer::ESTADO, $estadoPelicula->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByEstadoPelicula() only accepts arguments of type EstadoPelicula or PropelCollection');
     }
 }