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