Does the multiple datasource feature of Grails 2.0 support relations?

六月ゝ 毕业季﹏ 提交于 2019-12-24 00:19:37

问题


I'm trying to support some legacy tables and I was able to create a domain that uses a separate datasource of those legacy tables.

However, when I try to use that domain from the separate datasource in a hasMany, it fails.

Is it possible to relate hasMany to a domain on a different datasource?


回答1:


Unfortunately you can not have GORM automatically manage the association across multiple datasources. However, that said you can quite easily write the code that will accomplish what you are looking for and address some of the underlying performance issues with GORM at the same time. There is a very good example of this already.



来源:https://stackoverflow.com/questions/13851927/does-the-multiple-datasource-feature-of-grails-2-0-support-relations

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