/** * Get the associated MissionLeg object * * @param PropelPDO Optional Connection object. * @return MissionLeg The associated MissionLeg object. * @throws PropelException */ public function getMissionLeg(PropelPDO $con = null) { if ($this->aMissionLeg === null && $this->id !== null) { $c = new Criteria(MissionLegPeer::DATABASE_NAME); $c->add(MissionLegPeer::ID, $this->id); $this->aMissionLeg = MissionLegPeer::doSelectOne($c, $con); // Because this foreign key represents a one-to-one relationship, we will create a bi-directional association. $this->aMissionLeg->setAfaLeg($this); } return $this->aMissionLeg; }