Symfony 1.4 with multiple apps and different databases

岁酱吖の 提交于 2019-12-19 10:47:12

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!