我想将另一个数据库连接到我的项目并将其链接到我的包。有我的数据库连接配置:
# Doctrine Configuration in app/config/config.yml
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
forum:
driver: %database_driver2%
host: %database_host2%
port: %database_port2%
dbname: %database_name2%
user: %database_user2%
password: %database_password2%
charset: UTF8
orm:
default_entity_manager: default
entity_managers:
default:
connection: default
mappings:
ProjectBackBundle: ~
ProjectFrontBundle: ~
ProjectUsersBundle: ~
forum:
connection: forum
mappings:
ProjectForumBundle: ~
第二个数据库(论坛)已经存在,我检查了连接信息。当我访问该网站时,出现此错误: 无法识别的字段:usernameCanonical
为了生成de映射,我执行了以下命令:
php app/consolde doctrine:mapping:convert xml src/Project/ForumBundle/Resources/config/doctrine/metadata/orm --from-database --force --em="forum"
但是这个命令是无限的,它不会被执行。为什么 ?我错过了什么 ?