/** * Filter the query by a related Tipo object * * @param Tipo|PropelObjectCollection $tipo The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ArticuloQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByTipo($tipo, $comparison = null) { if ($tipo instanceof Tipo) { return $this->addUsingAlias(ArticuloPeer::IDTIPO, $tipo->getIdtipo(), $comparison); } elseif ($tipo instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ArticuloPeer::IDTIPO, $tipo->toKeyValue('PrimaryKey', 'Idtipo'), $comparison); } else { throw new PropelException('filterByTipo() only accepts arguments of type Tipo or PropelCollection'); } }