/** * Execute the query and get all results. * * @return array */ public function get() { if ($entities = $this->manager->hydrateAll($this->query->execute(), $this->metadata)) { foreach ($this->getRelations() as $name => $query) { $this->manager->related($entities, $name, $query); } } return $entities; }