doctrine 2 no metadata classes to process

2019-07-21 19:12发布

问题:

I already integrated zf 1 with doctrine 2

I created entities by this:
php doctrine.php orm:convert-mapping --force --from-database annotation C:/wamp/www/ip/application/models

now I'm going to create getter and setter for them and generating entities I get the errors no metadata classes to process

php doctrine.php orm:generate-entities --generate-annotations="true" C:/wamp/www/ip/application/models

回答1:

1- In the entity files generated, you need to delete this line:

"use Doctrine\ORM\Mapping as ORM;"

2- and also delete all appearances of ORM\