/**
  * Declares an association between this object and a ChildCategory object.
  *
  * @param                  ChildCategory $v
  * @return                 \GoogleShopping\Model\GoogleshoppingTaxonomy The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCategory(ChildCategory $v = null)
 {
     if ($v === null) {
         $this->setTheliaCategoryId(NULL);
     } else {
         $this->setTheliaCategoryId($v->getId());
     }
     $this->aCategory = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildCategory object, it will not be re-added.
     if ($v !== null) {
         $v->addGoogleshoppingTaxonomy($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \GoogleShopping\Model\Thelia\Model\Category object
  *
  * @param \GoogleShopping\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 ChildGoogleshoppingTaxonomyQuery The current query, for fluid interface
  */
 public function filterByCategory($category, $comparison = null)
 {
     if ($category instanceof \GoogleShopping\Model\Thelia\Model\Category) {
         return $this->addUsingAlias(GoogleshoppingTaxonomyTableMap::THELIA_CATEGORY_ID, $category->getId(), $comparison);
     } elseif ($category instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(GoogleshoppingTaxonomyTableMap::THELIA_CATEGORY_ID, $category->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCategory() only accepts arguments of type \\GoogleShopping\\Model\\Thelia\\Model\\Category or Collection');
     }
 }