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