What can i do for change my database conection in Symfony?
I have my database.yml wi开发者_高级运维th 3 different conection and I want to change "on fly" of database.
Thanks for your help!
You can bind tables to a specific connection - then doctrine creates them there, and whenever you use them, doctrine automatically knows which connection to use.
This example is from The symfony and Doctrine book, chapter 2:
Client:
connection: master
columns:
name: string(255)
username: string(255)
password: string(255)
精彩评论