【发布时间】:2023-04-01 05:56:01
【问题描述】:
我在部署 symfony2 应用时遇到问题。我收到以下错误:
SQLSTATE[42S02]: Base table or view not found: 1146 Table '14271425_sjokh.Books' doesn't exist
我发现此错误与案例问题有关。
给定的表存在于服务器上,但称为books 而不是Books。
我试图通过修改 config.yml 来解决这个问题,将其添加到 naming_strategy: doctrine.orm.naming_strategy.underscore(此处建议:Symfony2: Base table or view not found: 1146)但它没有帮助。
doctrine:
orm:
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
【问题讨论】:
标签: symfony