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