Does the multiple datasource feature of Grails 2.0 support relations?
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?
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.
TenantId is null when saving an entity in a Discriminator based multi tenant application in Grails 3.2 with GORM 6
Grails 3 (unsaved) instance issue while fetching from database (GORM)
Can't use get() in domain using Grails3
GORM findAll + cannot pass dynamic List as named parameter
How to display database records in grails
Configure Grails 3.0.9 for Oracle 12c with identity PK?
Adding condition to findAll and findAllBy methods
Neo4j and Mongodb as datasource in Grails
GORM (varchar .save(), non DATE): ORA-01861: literal does not match format string
GORM addTo methods not found in Spock test
spring-boot property exception while externalizing datasource properties and using actuator
Mapping hasMany relation and saving the related data
Method on class  was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails Correctly
What happens when two app servers in cluster start LiquiBase update (via Grails)?
use of mappedBy in Many to Many relationship in Grails
Domain class auto validation in grails