Example #1
0
 public function getStudentTypesJoinAcademicCalendar($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseStudentTypePeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collStudentTypes === null) {
         if ($this->isNew()) {
             $this->collStudentTypes = array();
         } else {
             $criteria->add(StudentTypePeer::PAYER_TYPE_ID, $this->getId());
             $this->collStudentTypes = StudentTypePeer::doSelectJoinAcademicCalendar($criteria, $con);
         }
     } else {
         $criteria->add(StudentTypePeer::PAYER_TYPE_ID, $this->getId());
         if (!isset($this->lastStudentTypeCriteria) || !$this->lastStudentTypeCriteria->equals($criteria)) {
             $this->collStudentTypes = StudentTypePeer::doSelectJoinAcademicCalendar($criteria, $con);
         }
     }
     $this->lastStudentTypeCriteria = $criteria;
     return $this->collStudentTypes;
 }