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