示例#1
0
 public function getVAbsenceEkskuls($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVAbsenceEkskulPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVAbsenceEkskuls === null) {
         if ($this->isNew()) {
             $this->collVAbsenceEkskuls = array();
         } else {
             $criteria->add(VAbsenceEkskulPeer::SCHEDULE_ID, $this->getId());
             VAbsenceEkskulPeer::addSelectColumns($criteria);
             $this->collVAbsenceEkskuls = VAbsenceEkskulPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(VAbsenceEkskulPeer::SCHEDULE_ID, $this->getId());
             VAbsenceEkskulPeer::addSelectColumns($criteria);
             if (!isset($this->lastVAbsenceEkskulCriteria) || !$this->lastVAbsenceEkskulCriteria->equals($criteria)) {
                 $this->collVAbsenceEkskuls = VAbsenceEkskulPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastVAbsenceEkskulCriteria = $criteria;
     return $this->collVAbsenceEkskuls;
 }
示例#2
0
 public static function doSelectOne(Criteria $criteria, $con = null)
 {
     $critcopy = clone $criteria;
     $critcopy->setLimit(1);
     $objects = VAbsenceEkskulPeer::doSelect($critcopy, $con);
     if ($objects) {
         return $objects[0];
     }
     return null;
 }