コード例 #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(CounselReviewerPeer::ID, $pks, Criteria::IN);
         $objs = CounselReviewerPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
コード例 #2
0
ファイル: BaseEmployee.php プロジェクト: taryono/school
 public function getCounselReviewersJoinCounsel($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseCounselReviewerPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collCounselReviewers === null) {
         if ($this->isNew()) {
             $this->collCounselReviewers = array();
         } else {
             $criteria->add(CounselReviewerPeer::EMPLOYEE_ID, $this->getId());
             $this->collCounselReviewers = CounselReviewerPeer::doSelectJoinCounsel($criteria, $con);
         }
     } else {
         $criteria->add(CounselReviewerPeer::EMPLOYEE_ID, $this->getId());
         if (!isset($this->lastCounselReviewerCriteria) || !$this->lastCounselReviewerCriteria->equals($criteria)) {
             $this->collCounselReviewers = CounselReviewerPeer::doSelectJoinCounsel($criteria, $con);
         }
     }
     $this->lastCounselReviewerCriteria = $criteria;
     return $this->collCounselReviewers;
 }
コード例 #3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = CounselReviewerPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCounselId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setEmployeeId($arr[$keys[2]]);
     }
 }