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