示例#1
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(MemberDetailPeer::ID, $pks, Criteria::IN);
         $objs = MemberDetailPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
示例#2
0
 public function getMemberDetails($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseMemberDetailPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collMemberDetails === null) {
         if ($this->isNew()) {
             $this->collMemberDetails = array();
         } else {
             $criteria->add(MemberDetailPeer::MEMBER_ID, $this->getId());
             MemberDetailPeer::addSelectColumns($criteria);
             $this->collMemberDetails = MemberDetailPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(MemberDetailPeer::MEMBER_ID, $this->getId());
             MemberDetailPeer::addSelectColumns($criteria);
             if (!isset($this->lastMemberDetailCriteria) || !$this->lastMemberDetailCriteria->equals($criteria)) {
                 $this->collMemberDetails = MemberDetailPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastMemberDetailCriteria = $criteria;
     return $this->collMemberDetails;
 }