Skip to content

Instantly share code, notes, and snippets.

@jeroendesloovere
Created December 30, 2016 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroendesloovere/aa16ebf8d2299e9964c2187561dea839 to your computer and use it in GitHub Desktop.
Save jeroendesloovere/aa16ebf8d2299e9964c2187561dea839 to your computer and use it in GitHub Desktop.
Reverse engineering doctrine

Doctrine Reverse Engineering

Doctrine Source

How to create Entity files from database tables?

1. Creating .orm.yml files in /Resources/config/...

php app/console doctrine:mapping:import --force AcmeBlogBundle yml --env=prod

You can also use xml. For example: I had to use SiesqoPlusMakerBundle

2. Creating the Entity files

# This command will generate entity classes with annotation mappings
php app/console doctrine:mapping:convert annotation ./src --env=prod

# But if you want to use YAML or XML mapping instead of annotations, you should only execute this command.
php app/console doctrine:generate:entities AcmeBlogBundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment