Example #1
0
 public function getSchedulesJoinSubjectCurr($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseSchedulePeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collSchedules === null) {
         if ($this->isNew()) {
             $this->collSchedules = array();
         } else {
             $criteria->add(SchedulePeer::EMPLOYEE_ID, $this->getId());
             $this->collSchedules = SchedulePeer::doSelectJoinSubjectCurr($criteria, $con);
         }
     } else {
         $criteria->add(SchedulePeer::EMPLOYEE_ID, $this->getId());
         if (!isset($this->lastScheduleCriteria) || !$this->lastScheduleCriteria->equals($criteria)) {
             $this->collSchedules = SchedulePeer::doSelectJoinSubjectCurr($criteria, $con);
         }
     }
     $this->lastScheduleCriteria = $criteria;
     return $this->collSchedules;
 }