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