/**
  * Filter the query by a related Genre object
  *
  * @param     Genre|PropelCollection $genre 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 filterByGenre($genre, $comparison = null)
 {
     if ($genre instanceof Genre) {
         return $this->addUsingAlias(MoviesgenresPeer::GENREID, $genre->getId(), $comparison);
     } elseif ($genre instanceof PropelCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(MoviesgenresPeer::GENREID, $genre->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByGenre() only accepts arguments of type Genre or PropelCollection');
     }
 }