public function getProjectsJoinsfGuardUserRelatedByCreatedBy($criteria = null, $con = null) { include_once 'lib/model/om/BaseProjectPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collProjects === null) { if ($this->isNew()) { $this->collProjects = array(); } else { $criteria->add(ProjectPeer::DEPARTMENT_ID, $this->getId()); $this->collProjects = ProjectPeer::doSelectJoinsfGuardUserRelatedByCreatedBy($criteria, $con); } } else { $criteria->add(ProjectPeer::DEPARTMENT_ID, $this->getId()); if (!isset($this->lastProjectCriteria) || !$this->lastProjectCriteria->equals($criteria)) { $this->collProjects = ProjectPeer::doSelectJoinsfGuardUserRelatedByCreatedBy($criteria, $con); } } $this->lastProjectCriteria = $criteria; return $this->collProjects; }