Symfony 通过已存在的数据库生成实体类。Create en
2019-04-02 本文已影响0人
王晨玮Mark
下面是通过数据库生成Entities // Create entities from database command follow
指定生成到 SessionBundle // Your Bundle
生成类型 annotation //Entities type also have others (xml,php)
php bin/console doctrine:mapping:import --force sessionBundle annotation
如果你需要指定数据库或者你要指定bundle路径// You can set Database name and Bundle Path
--em='数据库名' //set database name , Don't FORGET symbol '='
--path='相对路径' //set bundle path in your project
php bin/console doctrine:mapping:import --em='databasename' --force sessionBundle --path=src/SessionBundle/Entity annotation