I've been having trouble getting grails 3.1.6, and jndi to work with multiple datasources I'm very close but I need to set a 'hibernate.default_schema' on one of the data sources, however it's environment specific.
resources.goovy:
dataSource(JndiObjectFactoryBean) {
jndiName = "java:comp/env/jdbc/blah"
}
I've read that you can put it in a 'hibernateProperties' on the sessionFactory but I'm not sure how to add the property that I need.
How do I set the 'hibernate.default_schema' on the dataSource?
Edit: I've tried to set the schema via the application.yml but it doesn't seem to work:
someEnv: # rest of the db config setup in resources.groovy
dataSources:
dataSource:
hibernate:
default_schema: something