So, I have an existing database, but I could not follow the steps described here: http://symfony.com/doc/current/cookbook/doctrine/reverse_engineering.html , because some of my tables have foreign keys for primary keys .
My solution was to create a copy of the database without foreign key restrictions and first generate .yaml files with THAT.
So now I have XXX.orm.yml./src/My/MainBundle/Resources/config/doctrine/metadata/orm files
Then I tried to turn these .yml files into Entity classes with annotations using this command: php app / console doctrine: mapping: import MyMainBundle annotation However, this ignores my .yml files. It either generates common classes from my database without foreign keys, or it generates an error if I use it in my real database. He doesn't even look at my .yml files.
So, all I want to know is, how can I convert * .orm.yml files to Entities?
source share