gpt4 book ai didi

php - Symfony2 : Error with entitymanager configuration

转载 作者:搜寻专家 更新时间:2023-10-31 21:10:00 24 4
gpt4 key购买 nike

错误:InvalidConfigurationException:“doctrine.orm”下无法识别的选项“auto_mapping”

这是我的config.yml文件代码

# Doctrine Configuration
doctrine:
dbal:
default_connection: default
connections:
default:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
symfonydb:
driver: pdo_mysql
host: localhost
port: null
dbname: symfony
user: root
password: null
charset: UTF8
# if using pdo_sqlite as your database driver, add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# path: "%database_path%"

orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
default_entity_manager: default <<<<<<<<<<
entity_managers:
default:
connection: default
mappings:
AcmeDemoBundle: ~
AcmeUserBundle: ~
symfonydb:
connection: symfonydb
mappings:
FooNewsBundle: ~ <<<<<<<<<

如果我删除 auto_mapping: true 之后的代码,那么它工作正常并且不会抛出任何错误。那么问题是什么?

谢谢。

最佳答案

看看这个 GitHub 问题:Problem with installation?

auto_mapping 条目在 entity_managers.default 节点下,而不是在 orm 节点的根目录下。

关于php - Symfony2 : Error with entitymanager configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22143412/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com