public function getHydrator() { if (!$this->hydrator) { $this->setHydrator(new EntityHydrator()); } return parent::getHydrator(); }