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