예제 #1
0
 public function getWebMapSchools($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseWebMapSchoolPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collWebMapSchools === null) {
         if ($this->isNew()) {
             $this->collWebMapSchools = array();
         } else {
             $criteria->add(WebMapSchoolPeer::MAP_SCHOOL_LOCATION_ID, $this->getId());
             WebMapSchoolPeer::addSelectColumns($criteria);
             $this->collWebMapSchools = WebMapSchoolPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(WebMapSchoolPeer::MAP_SCHOOL_LOCATION_ID, $this->getId());
             WebMapSchoolPeer::addSelectColumns($criteria);
             if (!isset($this->lastWebMapSchoolCriteria) || !$this->lastWebMapSchoolCriteria->equals($criteria)) {
                 $this->collWebMapSchools = WebMapSchoolPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastWebMapSchoolCriteria = $criteria;
     return $this->collWebMapSchools;
 }
예제 #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(WebMapSchoolPeer::ID, $pks, Criteria::IN);
         $objs = WebMapSchoolPeer::doSelect($criteria, $con);
     }
     return $objs;
 }