Exemple #1
0
 /**
  * Filter the query by a related \Thelia\Model\ProductVersion object
  *
  * @param \Thelia\Model\ProductVersion|ObjectCollection $productVersion  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildProductQuery The current query, for fluid interface
  */
 public function filterByProductVersion($productVersion, $comparison = null)
 {
     if ($productVersion instanceof \Thelia\Model\ProductVersion) {
         return $this->addUsingAlias(ProductTableMap::ID, $productVersion->getId(), $comparison);
     } elseif ($productVersion instanceof ObjectCollection) {
         return $this->useProductVersionQuery()->filterByPrimaryKeys($productVersion->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProductVersion() only accepts arguments of type \\Thelia\\Model\\ProductVersion or Collection');
     }
 }