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(WebMapSchoolLocationPeer::ID, $pks, Criteria::IN); $objs = WebMapSchoolLocationPeer::doSelect($criteria, $con); } return $objs; }
public function getWebMapSchoolLocations($criteria = null, $con = null) { include_once 'lib/model/om/BaseWebMapSchoolLocationPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collWebMapSchoolLocations === null) { if ($this->isNew()) { $this->collWebMapSchoolLocations = array(); } else { $criteria->add(WebMapSchoolLocationPeer::MAP_PROVINCE_ID, $this->getId()); WebMapSchoolLocationPeer::addSelectColumns($criteria); $this->collWebMapSchoolLocations = WebMapSchoolLocationPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(WebMapSchoolLocationPeer::MAP_PROVINCE_ID, $this->getId()); WebMapSchoolLocationPeer::addSelectColumns($criteria); if (!isset($this->lastWebMapSchoolLocationCriteria) || !$this->lastWebMapSchoolLocationCriteria->equals($criteria)) { $this->collWebMapSchoolLocations = WebMapSchoolLocationPeer::doSelect($criteria, $con); } } } $this->lastWebMapSchoolLocationCriteria = $criteria; return $this->collWebMapSchoolLocations; }