Working with the datasources plugin using grails 1.3.6 (will upgrade soon) I get this error when rendering a taglib
org.springframework.orm.hibernate3.HibernateQueryException: DomainA is not mapped
These are the databases (both are postgresql and are located in the same server):
database A
schema x
table domain_a
table domain_b
database B
schema x
table DomainA
table DomainB
These are my mappings:
class domainA { // Domain A is defined in a plugin
mapping(table: "x.domain_a")
}
class domainB {
mapping(table: "x.domain_b")
}
What I want is domainA to be mapped in Database A and domainB to be mapped in Database B.
I'm using grails.config.locations in Config.groovy for Database A and Datasources.groovy for Database B with this config:
datasource(name: 'databaseB') {
driverClassName('org.postgresql.Driver')
url('jdbc:postgresql://host/databaseB')
username('user')
password('****')
domainClasses(['DomainB'])
readOnly(true)
dialect("org.hibernate.dialect.PostgreSQLDialect")
pooled(true)
environments(['development', 'test'])
}
I don't get what seems to be the problem
Has anyone had this trouble, Is there a workaround I could use? Maybe an upgrade to grails 2 could help?