ModelBundle/Manager/EntityDbMapper.php
public function fromEntityToDb($document)
    {
        $unitOfWork = $this->documentManager->getUnitOfWork();
        $persistenceBuilder = new PersistenceBuilder($this->documentManager, $unitOfWork);
        $mapping = array (
            'targetDocument' => $this->documentClass,
        );

        return $persistenceBuilder->prepareEmbeddedDocumentValue($mapping, $document, true);
    }
public function fromEntityToDb($document)
    {
        $unitOfWork = $this->documentManager->getUnitOfWork();
        $persistenceBuilder = new PersistenceBuilder($this->documentManager, $unitOfWork);
        $mapping = array (
            'targetDocument' => $this->documentClass,
        );

        return $persistenceBuilder->prepareEmbeddedDocumentValue($mapping, $document, true);
    }
public function fromEntityToDb ( $ document ) { $ unitOfWork = $ this -> documentManager -> getUnitOfWork ( ) ; $ persistenceBuilder = new PersistenceBuilder ( $ this -> documentManager , $ unitOfWork ) ; $ mapping = array ( 'targetDocument' => $ this -> documentClass , ) ; return $ persistenceBuilder -> prepareEmbeddedDocumentValue ( $ mapping , $ document , true ) ; }
Take a id to turn it into a embed document array representation

@param mixed $document

@return array
Take a id to turn it into a embed document array representation