I want to add other datasource to use with GORM.
DataSource.groovy
development {
dataSource {
dbCreate = "update"
driverClassName = "org.postgresql.Driver"
username = "usrcastor"
url = "jdbc:postgresql://localhost:5432/dbcastor_master"
password = "castor"
dialect = net.sf.hibernate.dialect.PostgreSQLDialect
pooled = true
loggingSql = false
}
dataSource_otherDataSource {
dbCreate = "update"
driverClassName = "org.postgresql.Driver"
username = "usrcastor"
url = "jdbc:postgresql://localhost:5432/dbcastor_child_a"
password = "castor"
dialect = net.sf.hibernate.dialect.PostgreSQLDialect
pooled = true
loggingSql = false
}
}
But already have a lot of domain classes and I no have time to define static mapping in each one.
Domain.groovy
static mapping {
datasource 'ALL'
}
Is posible to configurate grails to set datasource 'ALL' for all domains?