/** * Preload required relations. * * @param array $cmInstances Instances of current model for which to preload * relations. */ public function preloadRelations(array $cmInstances) { $root = $this->getRoot(); foreach ($this->_relationsToPreload as $relationName) { $qb = new self($root); $qb->preloadRelation($cmInstances, $relationName); } }