Example #1
0
 /**
  * Filter the query by a related BuyListing object
  *
  * @param   BuyListing|PropelObjectCollection $buyListing  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   ItemQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterByBuyListing($buyListing, $comparison = null)
 {
     if ($buyListing instanceof BuyListing) {
         return $this->addUsingAlias(ItemPeer::DATA_ID, $buyListing->getItemId(), $comparison);
     } elseif ($buyListing instanceof PropelObjectCollection) {
         return $this->useBuyListingQuery()->filterByPrimaryKeys($buyListing->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBuyListing() only accepts arguments of type BuyListing or PropelCollection');
     }
 }