/** * Filter the query by a related Articulo object * * @param Articulo|PropelObjectCollection $articulo the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return TipoQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByArticulo($articulo, $comparison = null) { if ($articulo instanceof Articulo) { return $this->addUsingAlias(TipoPeer::IDTIPO, $articulo->getIdtipo(), $comparison); } elseif ($articulo instanceof PropelObjectCollection) { return $this->useArticuloQuery()->filterByPrimaryKeys($articulo->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByArticulo() only accepts arguments of type Articulo or PropelCollection'); } }