Example #1
0
 /**
  * Declares an association between this object and a Companion object.
  *
  * @param      Companion $v
  * @return     MissionCompanion The current object (for fluent API support)
  * @throws     PropelException
  */
 public function setCompanion(Companion $v = null)
 {
     if ($v === null) {
         $this->setCompanionId(NULL);
     } else {
         $this->setCompanionId($v->getId());
     }
     $this->aCompanion = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Companion object, it will not be re-added.
     if ($v !== null) {
         $v->addMissionCompanion($this);
     }
     return $this;
 }