/** * Filter the query by a related Moviesgenres object * * @param Moviesgenres $moviesgenres the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MovieQuery The current query, for fluid interface */ public function filterByMoviesgenres($moviesgenres, $comparison = null) { if ($moviesgenres instanceof Moviesgenres) { return $this->addUsingAlias(MoviePeer::ID, $moviesgenres->getMovieid(), $comparison); } elseif ($moviesgenres instanceof PropelCollection) { return $this->useMoviesgenresQuery()->filterByPrimaryKeys($moviesgenres->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByMoviesgenres() only accepts arguments of type Moviesgenres or PropelCollection'); } }