I have a domain class with a mapping clause that looks like this
static mapping = {
datasource 'DB'
table 'manager.dbo.table_name'
}
It is working flawless on my app, I even have a @Resource annotation. But this custom mapping is not working for h2 testing. I was looking at this but it doesn't answer my question (I cannot find a place to insert a replace code before hibernate mapping is run)
How can I change the mapping for a Testing environment? Or, even easier, how can I prevent hibernate to take into consideration those classes? Is it possible?