public function getOneOrNullResult($hydratorType = HydratorFactory::TO_OBJECT) { try { return $this->getSingleResult($hydratorType); } catch (EmptyResultException $e) { return null; } }