예제 #1
0
 /**
  * @return Pilot
  */
 public function getCoPilot()
 {
     if (0 == (int) $this->getCopilotId()) {
         return null;
     }
     $c = new Criteria();
     $c->add(PilotPeer::ID, $this->getCopilotId());
     return PilotPeer::doSelectOne($c);
 }
예제 #2
0
 /**
  * Get the associated Pilot object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Pilot The associated Pilot object.
  * @throws     PropelException
  */
 public function getPilot(PropelPDO $con = null)
 {
     if ($this->aPilot === null && $this->pilot_id !== null) {
         $c = new Criteria(PilotPeer::DATABASE_NAME);
         $c->add(PilotPeer::ID, $this->pilot_id);
         $this->aPilot = PilotPeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aPilot->addMissionLegChanges($this);
         		 */
     }
     return $this->aPilot;
 }
예제 #3
0
 /**
  * Get the associated Pilot object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Pilot The associated Pilot object.
  * @throws     PropelException
  */
 public function getPilotRelatedByMopOrientedMemberId(PropelPDO $con = null)
 {
     if ($this->aPilotRelatedByMopOrientedMemberId === null && $this->mop_oriented_member_id !== null) {
         $c = new Criteria(PilotPeer::DATABASE_NAME);
         $c->add(PilotPeer::ID, $this->mop_oriented_member_id);
         $this->aPilotRelatedByMopOrientedMemberId = PilotPeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aPilotRelatedByMopOrientedMemberId->addPilotsRelatedByMopOrientedMemberId($this);
         		 */
     }
     return $this->aPilotRelatedByMopOrientedMemberId;
 }
예제 #4
0
파일: Member.php 프로젝트: yasirgit/afids
 /**
  * @return Pilot
  */
 public function getPilot()
 {
     $c = new Criteria();
     $c->add(PilotPeer::MEMBER_ID, $this->getId());
     return PilotPeer::doSelectOne($c);
 }