/** * 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'); } }
/** * Exclude object from result * * @param ChildDebit $debit Object to remove from the list of results * * @return $this|ChildDebitQuery The current query, for fluid interface */ public function prune($debit = null) { if ($debit) { $this->addUsingAlias(DebitTableMap::COL_ID, $debit->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildDebit object. * * @param ChildDebit $v * @return $this|\ORM\DebitPayment The current object (for fluent API support) * @throws PropelException */ public function setDebit(ChildDebit $v = null) { if ($v === null) { $this->setDebitId(NULL); } else { $this->setDebitId($v->getId()); } $this->aDebit = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildDebit object, it will not be re-added. if ($v !== null) { $v->addPayment($this); } return $this; }