/** * Filter the query by a related \Thelia\Model\FeatureProduct object * * @param \Thelia\Model\FeatureProduct|ObjectCollection $featureProduct 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 filterByFeatureProduct($featureProduct, $comparison = null) { if ($featureProduct instanceof \Thelia\Model\FeatureProduct) { return $this->addUsingAlias(ProductTableMap::ID, $featureProduct->getProductId(), $comparison); } elseif ($featureProduct instanceof ObjectCollection) { return $this->useFeatureProductQuery()->filterByPrimaryKeys($featureProduct->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByFeatureProduct() only accepts arguments of type \\Thelia\\Model\\FeatureProduct or Collection'); } }