问题
I have an important Symfony project, in which I have different apps. I'd like to have different databases, one for each apps.
I've find that I can have multiple database connections, but when I create schema, models forms and filters symfony put all these classes into /lib/folder.
Is there a way for create models, forms, filters for each application based on his own schema, and put the resulting classes into somthing like /apps/myApp/lib?
Thankyou very much...
回答1:
You can use the "package" parameter in your schema like so:
Model:
connection: doctrine
package: your_package
tableName: model
columns:
...
来源:https://stackoverflow.com/questions/11203290/symfony-1-4-with-multiple-apps-and-different-databases