简体   繁体   中英

How to create doctrine model entities from db without symfony?

I want to add doctrine framework to my custom php project. How can I create model entities by db tables with doctrine.

What doctrine version are you using? With the latest version you can use this after install doctrine in your project:

php bin/console doctrine:mapping:import "App\\Entity" annotation --path=src/Entity

You must change the directory and the type (annotation, xml, yml), and you must have configured the connection to the database where the tables are.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM