/** * Get the associated Patient object * * @param PropelPDO Optional Connection object. * @return Patient The associated Patient object. * @throws PropelException */ public function getPatient(PropelPDO $con = null) { if ($this->aPatient === null && $this->patient_id !== null) { $c = new Criteria(PatientPeer::DATABASE_NAME); $c->add(PatientPeer::ID, $this->patient_id); $this->aPatient = PatientPeer::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->aPatient->addVisits($this); */ } return $this->aPatient; }