I have an existing table with 5 columns, and I want to generate an Entity without that generates a new migration with new table!
Thanks!
I have an existing table with 5 columns, and I want to generate an Entity without that generates a new migration with new table!
Thanks!
So, as I mentioned in comment - you just need to follow steps in Symfony documentation.
This way, for Symfony 3 you need follow this:
php bin/console doctrine:mapping:import --force AppBundle xml
This command line tool asks Doctrine to introspect the database and generate the XML metadata files under the src/AppBundle/Resources/config/doctrine
folder of your bundle.
Once the metadata files are generated, you can ask Doctrine to build related entity classes by executing the following command.
php bin/console doctrine:mapping:convert annotation ./src
It will generate Entity classes, and after that you must to remove the XML files, generated by first command.