/** * Filter the query by a related Movie object * * @param Movie|PropelCollection $movie The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MoviesgenresQuery The current query, for fluid interface */ public function filterByMovie($movie, $comparison = null) { if ($movie instanceof Movie) { return $this->addUsingAlias(MoviesgenresPeer::MOVIEID, $movie->getId(), $comparison); } elseif ($movie instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(MoviesgenresPeer::MOVIEID, $movie->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByMovie() only accepts arguments of type Movie or PropelCollection'); } }