public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VTotalUploadStudentPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setTotalCatalog($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setAcademicCalendarId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setStudentId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setCatCategoryId($arr[$keys[3]]); } }
public static function retrieveByPK($academic_calendar_id, $student_id, $cat_category_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VTotalUploadStudentPeer::ACADEMIC_CALENDAR_ID, $academic_calendar_id); $criteria->add(VTotalUploadStudentPeer::STUDENT_ID, $student_id); $criteria->add(VTotalUploadStudentPeer::CAT_CATEGORY_ID, $cat_category_id); $v = VTotalUploadStudentPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }