Good afternoon,
I had some problems with the Doctrine entity generator when creating a new project in the Symfony 2 framework.
For testing purposes, I have the following table called by users: id INT PK
username VARCHAR(80)
password VARCHAR(150)
salt VARCHAR(100)
email VARCHAR(100)
I created a new project without any problems. I named my new package MyTestBundle.
After completing the database design, I use php app/console doctrine:mapping:convert yml ./src/My/TestBundle/Resources/config/doctrine/metadata/orm --from-database --forceto map the database schema to Yaml format files. Then I use php app/console doctrine:mapping:import MyTestBundle annotationit php app/console doctrine:generate:entities MyTestBundleto import entity mapping and creation.
I have a few important questions regarding entity generation:
, " "? yml, ./src/My/TestBundle/Resources/config/doctrine/metadata/orm, , , . - ?
. ( ):
roles: id INT PK, name VARCHAR(50)
users_roles: id INT PK, user_id INT, role_id INT
? UsersRoles, . - ?
/ .
Edit
:
Yaml ./src/MyTestBundle/resources/config/doctrine/metadata/orm, User.orm.yml. , , Bundle "MyTestBundle" does not contain any mapped entities.
,
Dave