public function getClassGroupsRelatedByParentJoinClassType($criteria = null, $con = null) { include_once 'lib/model/om/BaseClassGroupPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collClassGroupsRelatedByParent === null) { if ($this->isNew()) { $this->collClassGroupsRelatedByParent = array(); } else { $criteria->add(ClassGroupPeer::PARENT, $this->getId()); $this->collClassGroupsRelatedByParent = ClassGroupPeer::doSelectJoinClassType($criteria, $con); } } else { $criteria->add(ClassGroupPeer::PARENT, $this->getId()); if (!isset($this->lastClassGroupRelatedByParentCriteria) || !$this->lastClassGroupRelatedByParentCriteria->equals($criteria)) { $this->collClassGroupsRelatedByParent = ClassGroupPeer::doSelectJoinClassType($criteria, $con); } } $this->lastClassGroupRelatedByParentCriteria = $criteria; return $this->collClassGroupsRelatedByParent; }