public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = StudentSiblingPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setStudentId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setStudentRelated($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setName($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setSex($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setDepartmentId($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setClassGroupId($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setDepartmentName($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setClassName($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setNote($arr[$keys[9]]); } }
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(StudentSiblingPeer::ID, $pks, Criteria::IN); $objs = StudentSiblingPeer::doSelect($criteria, $con); } return $objs; }
public function getStudentSiblingsRelatedByStudentRelatedJoinClassGroup($criteria = null, $con = null) { include_once 'lib/model/om/BaseStudentSiblingPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collStudentSiblingsRelatedByStudentRelated === null) { if ($this->isNew()) { $this->collStudentSiblingsRelatedByStudentRelated = array(); } else { $criteria->add(StudentSiblingPeer::STUDENT_RELATED, $this->getId()); $this->collStudentSiblingsRelatedByStudentRelated = StudentSiblingPeer::doSelectJoinClassGroup($criteria, $con); } } else { $criteria->add(StudentSiblingPeer::STUDENT_RELATED, $this->getId()); if (!isset($this->lastStudentSiblingRelatedByStudentRelatedCriteria) || !$this->lastStudentSiblingRelatedByStudentRelatedCriteria->equals($criteria)) { $this->collStudentSiblingsRelatedByStudentRelated = StudentSiblingPeer::doSelectJoinClassGroup($criteria, $con); } } $this->lastStudentSiblingRelatedByStudentRelatedCriteria = $criteria; return $this->collStudentSiblingsRelatedByStudentRelated; }