I tried to generate an annotation php class from my database.
php app/console doctrine:generate:entity
But doctrine detect just id field, why? So why is not automatic?
( "users" table fields: id, username, password )
Thanks for the answers.
With that command you're trying to generate an entity from a mapping file.
If you want to generate entity (entities) from db tables - and if I understood correctly you are - you should use
doctrine:mapping:import
and then use
doctrine:generate:entities
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.