/** * Filter the query by a related Propiedad object * * @param Propiedad|PropelObjectCollection $propiedad the related object 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 filterByPropiedad($propiedad, $comparison = null) { if ($propiedad instanceof Propiedad) { return $this->addUsingAlias(ArticuloPeer::IDARTICULO, $propiedad->getIdarticulo(), $comparison); } elseif ($propiedad instanceof PropelObjectCollection) { return $this->usePropiedadQuery()->filterByPrimaryKeys($propiedad->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPropiedad() only accepts arguments of type Propiedad or PropelCollection'); } }