示例#1
0
 public function getVStudentLogins($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseVStudentLoginPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collVStudentLogins === null) {
         if ($this->isNew()) {
             $this->collVStudentLogins = array();
         } else {
             $criteria->add(VStudentLoginPeer::TEST_APPLICANT_ID, $this->getId());
             VStudentLoginPeer::addSelectColumns($criteria);
             $this->collVStudentLogins = VStudentLoginPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(VStudentLoginPeer::TEST_APPLICANT_ID, $this->getId());
             VStudentLoginPeer::addSelectColumns($criteria);
             if (!isset($this->lastVStudentLoginCriteria) || !$this->lastVStudentLoginCriteria->equals($criteria)) {
                 $this->collVStudentLogins = VStudentLoginPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastVStudentLoginCriteria = $criteria;
     return $this->collVStudentLogins;
 }
示例#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(VStudentLoginPeer::ID, $pks, Criteria::IN);
         $objs = VStudentLoginPeer::doSelect($criteria, $con);
     }
     return $objs;
 }