public function getAcademicCalendarsRelatedByParentJoinDepartment($criteria = null, $con = null) { include_once 'lib/model/om/BaseAcademicCalendarPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collAcademicCalendarsRelatedByParent === null) { if ($this->isNew()) { $this->collAcademicCalendarsRelatedByParent = array(); } else { $criteria->add(AcademicCalendarPeer::PARENT, $this->getId()); $this->collAcademicCalendarsRelatedByParent = AcademicCalendarPeer::doSelectJoinDepartment($criteria, $con); } } else { $criteria->add(AcademicCalendarPeer::PARENT, $this->getId()); if (!isset($this->lastAcademicCalendarRelatedByParentCriteria) || !$this->lastAcademicCalendarRelatedByParentCriteria->equals($criteria)) { $this->collAcademicCalendarsRelatedByParent = AcademicCalendarPeer::doSelectJoinDepartment($criteria, $con); } } $this->lastAcademicCalendarRelatedByParentCriteria = $criteria; return $this->collAcademicCalendarsRelatedByParent; }