symfony - Symfony2 Multiple databases configuration/connections and entity managers -


i want connect database project , link bundle. there configuration database connection :

# 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: ~ 

the second database (forum) exists , check connection informations. when go website have error : unrecognized field: usernamecanonical

there command execute in order generate de mapping :

php app/consolde doctrine:mapping:convert xml src/project/forumbundle/resources/config/doctrine/metadata/orm --from-database --force --em="forum" 

but command infinite, not executed. why ? did miss ?

from error message, using fosuserbundle, , have tell entity manager use, own bundles. configuration 'default' entity manager should this:

        default:             connection:       default             mappings:                 projectbackbundle: ~                 projectfrontbundle: ~                 projectusersbundle: ~                 fosuserbundle: ~ 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -