/**
  * {@inheritdoc}
  */
 public function hydrate($document, MetaInformationInterface $metaInformation)
 {
     $sourceTargetEntity = $metaInformation->getEntity();
     $targetEntity = clone $sourceTargetEntity;
     $metaInformation->setEntity($targetEntity);
     return $this->valueHydrator->hydrate($document, $metaInformation);
 }
 /**
  * {@inheritdoc}
  */
 public function hydrate($document, MetaInformationInterface $metaInformation)
 {
     $entityId = $metaInformation->getEntityId();
     $doctrineEntity = $this->doctrine->getManager()->getRepository($metaInformation->getClassName())->find($entityId);
     if ($doctrineEntity !== null) {
         $metaInformation->setEntity($doctrineEntity);
     }
     return $this->valueHydrator->hydrate($document, $metaInformation);
 }