/** * Filter the query by a related \Thelia\Model\ProductSaleElements object * * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProductQuery The current query, for fluid interface */ public function filterByProductSaleElements($productSaleElements, $comparison = null) { if ($productSaleElements instanceof \Thelia\Model\ProductSaleElements) { return $this->addUsingAlias(ProductTableMap::ID, $productSaleElements->getProductId(), $comparison); } elseif ($productSaleElements instanceof ObjectCollection) { return $this->useProductSaleElementsQuery()->filterByPrimaryKeys($productSaleElements->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByProductSaleElements() only accepts arguments of type \\Thelia\\Model\\ProductSaleElements or Collection'); } }