I use CodeIgniter 2 with doctrine 2 and this is the project that I am working in
https://github.com/wildlyinaccurate/CodeIgniter-2-with-Doctrine-2
I need to generate Entity classes from existing Database
so I configured the Doctrine to be in development mode and I set the Database on the CodeIgniter
after that I write this command
php doctrine orm:convert-mapping --from-database annotation models/generated
the classes generated correctly from database but without any method,after that I write this command for generating entities
php doctrine orm:generate-entities --regenerate-entities="1" models/generated
but I find this error "No Metadata classes to process"
Thanks.
In Doctrine.php in libraries folder add these lines, to load the driver:
Create your Mapping files. And generate entities:
Now you can create tables in your db:
Here is correct line of code try now:
Most of doctrine documentation and tutorials are not correct. You should use this command:
In the entity files generated, you neet do delete "use Doctrine\ORM\Mapping as ORM;"
and replace "ORM\" with ""