/** * Filter the query by a related \CriteriaSearch\Model\Thelia\Model\TaxRule object * * @param \CriteriaSearch\Model\Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCriteriaSearchCategoryTaxRuleQuery The current query, for fluid interface */ public function filterByTaxRule($taxRule, $comparison = null) { if ($taxRule instanceof \CriteriaSearch\Model\Thelia\Model\TaxRule) { return $this->addUsingAlias(CriteriaSearchCategoryTaxRuleTableMap::TAX_RULE_ID, $taxRule->getId(), $comparison); } elseif ($taxRule instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CriteriaSearchCategoryTaxRuleTableMap::TAX_RULE_ID, $taxRule->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByTaxRule() only accepts arguments of type \\CriteriaSearch\\Model\\Thelia\\Model\\TaxRule or Collection'); } }