Beispiel #1
0
 /**
  * Get the associated WardBed object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     WardBed The associated WardBed object.
  * @throws     PropelException
  */
 public function getWardBed(PropelPDO $con = null)
 {
     if ($this->aWardBed === null && $this->ward_bed_id !== null) {
         $c = new Criteria(WardBedPeer::DATABASE_NAME);
         $c->add(WardBedPeer::ID, $this->ward_bed_id);
         $this->aWardBed = WardBedPeer::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->aWardBed->addVisits($this);
         		 */
     }
     return $this->aWardBed;
 }