ModelBundle/Manager/EntityDbMapper.php
public function fromDbToEntity(array $data)
    {
        $hydratorFactory = $this->documentManager->getHydratorFactory();
        $documentClass = $this->documentClass;

        $document = new $documentClass();
        $hydratorFactory->hydrate($document, $data);

        return $document;
    }
public function fromDbToEntity(array $data)
    {
        $hydratorFactory = $this->documentManager->getHydratorFactory();
        $documentClass = $this->documentClass;

        $document = new $documentClass();
        $hydratorFactory->hydrate($document, $data);

        return $document;
    }
Take a embed document array representation to return entity

@param array $data

@return mixed