I have zf2 DoctrineORMModule and DoctrienModule installed. I am trying to use a command-line tool to create mapping files and generate entities from these mapping files. (I know this is not the most preferred method, but thatβs how I am going to do it. I have reasons.)
I have a custom module configured, and here is my Doctrine configuration for this module.
// Doctrine config 'doctrine' => array( 'driver' => array( 'Restful_driver' => array( 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', 'cache' => 'array', 'paths' => array(__DIR__ . '/../src/Restful/Entities') ), 'orm_default' => array( 'drivers' => array( 'Restful\Entities' => 'Restful_driver' ) ) ) )
First i run
doctrine orm:convert-mapping xml /to/my/dest/path --from-database --force
This will create my XML file with all the table information. This part works fine, and I can view the xml she created. Then i try to run
doctrine orm:generate-entities /to/my/dest/path --generate-annotations --generate-methods
I have no errors, but I am not getting any results either. The output from the previous command.
No Metadata Classes to process.
I tried to read, but did not find articles that really solve my problem. Most say that my annotations / mappings are not configured correctly. But I can reset the entity manager through the controller.
var_dump($this->getServiceLocator()->get('doctrine.entitymanager.orm_default'));
What do I need to do to get this to generate entities from xml mappings? Any help is appreciated.
source share