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