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 getStudentSiblingsRelatedByStudentRelated($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()); StudentSiblingPeer::addSelectColumns($criteria); $this->collStudentSiblingsRelatedByStudentRelated = StudentSiblingPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(StudentSiblingPeer::STUDENT_RELATED, $this->getId()); StudentSiblingPeer::addSelectColumns($criteria); if (!isset($this->lastStudentSiblingRelatedByStudentRelatedCriteria) || !$this->lastStudentSiblingRelatedByStudentRelatedCriteria->equals($criteria)) { $this->collStudentSiblingsRelatedByStudentRelated = StudentSiblingPeer::doSelect($criteria, $con); } } } $this->lastStudentSiblingRelatedByStudentRelatedCriteria = $criteria; return $this->collStudentSiblingsRelatedByStudentRelated; }