/** * Get the associated Exam object * * @param PropelPDO Optional Connection object. * @return Exam The associated Exam object. * @throws PropelException */ public function getExam(PropelPDO $con = null) { if ($this->aExam === null && $this->exam_id !== null) { $c = new Criteria(ExamPeer::DATABASE_NAME); $c->add(ExamPeer::ID, $this->exam_id); $this->aExam = ExamPeer::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->aExam->addExamComments($this); */ } return $this->aExam; }