예제 #1
0
 /**
  * Filter the query by a related \Thelia\Model\ImportCategory object
  *
  * @param \Thelia\Model\ImportCategory|ObjectCollection $importCategory The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildImportCategoryI18nQuery The current query, for fluid interface
  */
 public function filterByImportCategory($importCategory, $comparison = null)
 {
     if ($importCategory instanceof \Thelia\Model\ImportCategory) {
         return $this->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->getId(), $comparison);
     } elseif ($importCategory instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByImportCategory() only accepts arguments of type \\Thelia\\Model\\ImportCategory or Collection');
     }
 }