gorm


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.

Related Links

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

Categories

HOME
vim
minimum-spanning-tree
rsyslog
leon
graphql
sharepoint-designer
ojdbc
yum
convolution
awesome-wm
cloudkit
communication
spring-kafka
floating-action-button
iolanguage
serverless-framework
worldwind
highlight.js
tostring
angular-ui
flux
google-pagespeed
conemu
errorlevel
web-sql
wkwebview
one-to-many
tdd
facet
wpfdatagrid
social-media
applozic
madlib
android-ble
plsql-psp
main
hot-module-replacement
twitch
unspecified
ssjs
opshub
ws-security
pdf-reactor
reactive-cocoa-5
qcombobox
user-accounts
python-c-api
python-webbrowser
veracode
drupal-6
r-forge
vtigercrm
log4c
dlna
ipconfig
tform
revolution-r
maven-tomcat-plugin
r-tree
atk4
ibaction
remobjects
key-management
e10s
gui-test-framework
cdt
valueconverter
bundles
concurrent-collections
oracle-warehouse-builder
multiprocessor
pygit2
enterprisedb
referrer
e4x
bubble-chart
removeclass
vdsp
heartbeat
yetanotherforum
yslow
createwindow
dmx512
dentrix
perfect-hash
simpletest

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App