错误: 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 之后的代码,那么它工作正常并且不会抛出任何错误。 那么问题是什么?
Thnaks。
答案 0 :(得分:2)
看看这个GitHub问题:Problem with installation?
auto_mapping
条目位于entity_managers.default
节点下,而不是orm
节点的根目录。