Пример #1
0
 public function getsfGuardUserProfilesJoinDepartment($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BasesfGuardUserProfilePeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collsfGuardUserProfiles === null) {
         if ($this->isNew()) {
             $this->collsfGuardUserProfiles = array();
         } else {
             $criteria->add(sfGuardUserProfilePeer::USER_ID, $this->getId());
             $this->collsfGuardUserProfiles = sfGuardUserProfilePeer::doSelectJoinDepartment($criteria, $con);
         }
     } else {
         $criteria->add(sfGuardUserProfilePeer::USER_ID, $this->getId());
         if (!isset($this->lastsfGuardUserProfileCriteria) || !$this->lastsfGuardUserProfileCriteria->equals($criteria)) {
             $this->collsfGuardUserProfiles = sfGuardUserProfilePeer::doSelectJoinDepartment($criteria, $con);
         }
     }
     $this->lastsfGuardUserProfileCriteria = $criteria;
     return $this->collsfGuardUserProfiles;
 }