Esempio n. 1
0
 /**
  * Filter the query by a related Watchlist object
  *
  * @param   Watchlist|PropelObjectCollection $watchlist  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 filterByOnWatchlist($watchlist, $comparison = null)
 {
     if ($watchlist instanceof Watchlist) {
         return $this->addUsingAlias(ItemPeer::DATA_ID, $watchlist->getItemId(), $comparison);
     } elseif ($watchlist instanceof PropelObjectCollection) {
         return $this->useOnWatchlistQuery()->filterByPrimaryKeys($watchlist->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByOnWatchlist() only accepts arguments of type Watchlist or PropelCollection');
     }
 }