Symfony 3 Doctrine - 如何使用underscore_separate命名约定从数据库生成实体

时间:2015-12-03 17:54:20

标签: doctrine naming-conventions symfony

我有像 product_id - >这样的表格名称,描述,价格我希望所有列命名约定为underscore_separate

我尝试在 config.yml 中设置 naming_strategy:doctrine.orm.naming_strategy.underscore 然后使用如下命令生成实体: php bin / console doctrine:mapping:import --force AcmeBlogBu​​ndle xml

但它仍然是CamelCase

那么在生成实体时,我应该怎样做才能将列名称的命名约定更改为underscore_separate?

0 个答案:

没有答案