Exemplo n.º 1
0
 public function getStudentJobHistorys($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseStudentJobHistoryPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collStudentJobHistorys === null) {
         if ($this->isNew()) {
             $this->collStudentJobHistorys = array();
         } else {
             $criteria->add(StudentJobHistoryPeer::ACADEMIC_CALENDAR_ID, $this->getId());
             StudentJobHistoryPeer::addSelectColumns($criteria);
             $this->collStudentJobHistorys = StudentJobHistoryPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(StudentJobHistoryPeer::ACADEMIC_CALENDAR_ID, $this->getId());
             StudentJobHistoryPeer::addSelectColumns($criteria);
             if (!isset($this->lastStudentJobHistoryCriteria) || !$this->lastStudentJobHistoryCriteria->equals($criteria)) {
                 $this->collStudentJobHistorys = StudentJobHistoryPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastStudentJobHistoryCriteria = $criteria;
     return $this->collStudentJobHistorys;
 }
Exemplo n.º 2
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(StudentJobHistoryPeer::ID, $pks, Criteria::IN);
         $objs = StudentJobHistoryPeer::doSelect($criteria, $con);
     }
     return $objs;
 }