Symfony 1.4具有多个应用程序和不同的数据库 [英] Symfony 1.4 with multiple apps and different databases
问题描述
我想要有不同的数据库,每个应用程序一个。
我发现我可以有多个数据库连接,但是当我创建模式,模型表单和过滤器symfony将所有这些类放入/ lib /文件夹。
有没有办法根据自己的架构为每个应用程序创建模型,表单,过滤器,并将结果类放在像/ apps / myApp / lib这样的东西?
非常感谢...
您可以在模式中使用package参数:
型号:
连接:doctrine
包装:your_package
tableName:模型
列:
...
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...
You can use the "package" parameter in your schema like so:
Model:
connection: doctrine
package: your_package
tableName: model
columns:
...
这篇关于Symfony 1.4具有多个应用程序和不同的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!