/** * Filter the query by a related \Invoice object * * @param \Invoice|ObjectCollection $invoice The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildReminderQuery The current query, for fluid interface */ public function filterByInvoice($invoice, $comparison = null) { if ($invoice instanceof \Invoice) { return $this->addUsingAlias(ReminderTableMap::COL_INVOICE_ID, $invoice->getId(), $comparison); } elseif ($invoice instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ReminderTableMap::COL_INVOICE_ID, $invoice->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByInvoice() only accepts arguments of type \\Invoice or Collection'); } }
/** * Declares an association between this object and a ChildInvoice object. * * @param ChildInvoice $v * @return $this|\Bill The current object (for fluent API support) * @throws PropelException */ public function setInvoice(ChildInvoice $v = null) { if ($v === null) { $this->setInvoiceId(NULL); } else { $this->setInvoiceId($v->getId()); } $this->aInvoice = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildInvoice object, it will not be re-added. if ($v !== null) { $v->addBill($this); } return $this; }
/** * Exclude object from result * * @param ChildInvoice $invoice Object to remove from the list of results * * @return $this|ChildInvoiceQuery The current query, for fluid interface */ public function prune($invoice = null) { if ($invoice) { $this->addUsingAlias(InvoiceTableMap::COL_ID, $invoice->getId(), Criteria::NOT_EQUAL); } return $this; }