美文网首页
Symfony 通过已存在的数据库生成实体类。Create en

Symfony 通过已存在的数据库生成实体类。Create en

作者: 王晨玮Mark | 来源:发表于2019-04-02 17:47 被阅读0次

下面是通过数据库生成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

官方文档:How to Generate Entities from an Existing Database

相关文章

网友评论

      本文标题:Symfony 通过已存在的数据库生成实体类。Create en

      本文链接:https://www.haomeiwen.com/subject/faagbqtx.html