Example #1
0
 public function getStudentCoursesJoinSchedule($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseStudentCoursePeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collStudentCourses === null) {
         if ($this->isNew()) {
             $this->collStudentCourses = array();
         } else {
             $criteria->add(StudentCoursePeer::SUBJECT_CURR_ID, $this->getId());
             $this->collStudentCourses = StudentCoursePeer::doSelectJoinSchedule($criteria, $con);
         }
     } else {
         $criteria->add(StudentCoursePeer::SUBJECT_CURR_ID, $this->getId());
         if (!isset($this->lastStudentCourseCriteria) || !$this->lastStudentCourseCriteria->equals($criteria)) {
             $this->collStudentCourses = StudentCoursePeer::doSelectJoinSchedule($criteria, $con);
         }
     }
     $this->lastStudentCourseCriteria = $criteria;
     return $this->collStudentCourses;
 }