/**
  * 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');
     }
 }
 /**
  * Declares an association between this object and a ChildTaxRule object.
  *
  * @param                  ChildTaxRule $v
  * @return                 \CriteriaSearch\Model\CriteriaSearchCategoryTaxRule The current object (for fluent API support)
  * @throws PropelException
  */
 public function setTaxRule(ChildTaxRule $v = null)
 {
     if ($v === null) {
         $this->setTaxRuleId(NULL);
     } else {
         $this->setTaxRuleId($v->getId());
     }
     $this->aTaxRule = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildTaxRule object, it will not be re-added.
     if ($v !== null) {
         $v->addCriteriaSearchCategoryTaxRule($this);
     }
     return $this;
 }