Exemplo n.º 1
0
 /**
  * Filter the query by a related \ORM\Credit object
  *
  * @param \ORM\Credit|ObjectCollection $credit The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCreditPaymentQuery The current query, for fluid interface
  */
 public function filterByCredit($credit, $comparison = null)
 {
     if ($credit instanceof \ORM\Credit) {
         return $this->addUsingAlias(CreditPaymentTableMap::COL_CREDIT_ID, $credit->getId(), $comparison);
     } elseif ($credit instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CreditPaymentTableMap::COL_CREDIT_ID, $credit->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCredit() only accepts arguments of type \\ORM\\Credit or Collection');
     }
 }