Create Single Entity on Doctrine 2 + Symfony 2

First if you don’t have an YML file but have table on your database, run this command to import YML file from this database:

php app/console doctrine:mapping:import YourAppBundle yml --filter="Table"

Based on an YML File this command will create a single entity for you:

php app/console doctrine:generate:entities YourAppBundle:Table --path src/

And if you want to create all entities

php app/console doctrine:mapping:import YourAppBundle yml
php app/console doctrine:generate:entities YourAppBundle

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>