Ejemplo n.º 1
0
 /**
  * Get the associated Donor object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Donor The associated Donor object.
  * @throws     PropelException
  */
 public function getDonor(PropelPDO $con = null)
 {
     if ($this->aDonor === null && $this->donor_id !== null) {
         $c = new Criteria(DonorPeer::DATABASE_NAME);
         $c->add(DonorPeer::ID, $this->donor_id);
         $this->aDonor = DonorPeer::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->aDonor->addDonations($this);
         		 */
     }
     return $this->aDonor;
 }