public function getLocationsJoinLocationCategory($criteria = null, $con = null) { include_once 'lib/model/om/BaseLocationPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collLocations === null) { if ($this->isNew()) { $this->collLocations = array(); } else { $criteria->add(LocationPeer::LOCATION_CONDITION_ID, $this->getId()); $this->collLocations = LocationPeer::doSelectJoinLocationCategory($criteria, $con); } } else { $criteria->add(LocationPeer::LOCATION_CONDITION_ID, $this->getId()); if (!isset($this->lastLocationCriteria) || !$this->lastLocationCriteria->equals($criteria)) { $this->collLocations = LocationPeer::doSelectJoinLocationCategory($criteria, $con); } } $this->lastLocationCriteria = $criteria; return $this->collLocations; }