public function getHydratorForEntity($value)
    {
        $entityMetadata = $this->getMetadataMap()[ClassUtils::getRealClass(get_class($value))];
        $objectManagerClass = $this->getDoctrineHydratorConfig()[$entityMetadata['hydrator']]['object_manager'];

        return new DoctrineHydrator($this->getServiceLocator()->get($objectManagerClass), true);
    }