Пример #1
0
 /**
  * Filter the query by a related \ORM\Debit object
  *
  * @param \ORM\Debit|ObjectCollection $debit The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildDebitPaymentQuery The current query, for fluid interface
  */
 public function filterByDebit($debit, $comparison = null)
 {
     if ($debit instanceof \ORM\Debit) {
         return $this->addUsingAlias(DebitPaymentTableMap::COL_DEBIT_ID, $debit->getId(), $comparison);
     } elseif ($debit instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DebitPaymentTableMap::COL_DEBIT_ID, $debit->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByDebit() only accepts arguments of type \\ORM\\Debit or Collection');
     }
 }