Example #1
0
 /**
  * Filter the query by a related \App\Propel\ProductVariation object
  *
  * @param \App\Propel\ProductVariation|ObjectCollection $productVariation the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildVariationQuery The current query, for fluid interface
  */
 public function filterByProductVariation($productVariation, $comparison = null)
 {
     if ($productVariation instanceof \App\Propel\ProductVariation) {
         return $this->addUsingAlias(VariationTableMap::COL_VARIATION_ID, $productVariation->getVariationId(), $comparison);
     } elseif ($productVariation instanceof ObjectCollection) {
         return $this->useProductVariationQuery()->filterByPrimaryKeys($productVariation->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProductVariation() only accepts arguments of type \\App\\Propel\\ProductVariation or Collection');
     }
 }