/** * Declares an association between this object and a ChildAddress object. * * @param ChildAddress $v * @return \Thelia\Model\Cart The current object (for fluent API support) * @throws PropelException */ public function setAddressRelatedByAddressInvoiceId(ChildAddress $v = null) { if ($v === null) { $this->setAddressInvoiceId(NULL); } else { $this->setAddressInvoiceId($v->getId()); } $this->aAddressRelatedByAddressInvoiceId = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildAddress object, it will not be re-added. if ($v !== null) { $v->addCartRelatedByAddressInvoiceId($this); } return $this; }