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