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