I have the multitier web-application.
It has the REST-service and the WEB-component on the additional external server.
But both are use the same domain classes (I write the standalone plugin for them).
The REST-service is needed database access and it has Hibernate plugin in the dependencies.
But WEB-component doesn't needed that plugin because it is only REST-client.
After some time of project existence, we are comprehended that we are needed Spring Security.
And the Security plugin demands database access from us.
So, on Grails 2.2 I've added hibernate plugin to project, because of the same domain classes between projects.
Though that was wrong, but that works.
Now I'm trying to upgrade to Grails 2.4 and Hibernate4 and I'm still having that problem.
WEB-component Grails has tried to create/update tables for domain and writes error logs on fail.
So, here is the question.
Is there are exists any way to exclude/include some classes from hibernate processing?
I want to say "Hey, hibernate, please do what you want with Spring Security and don't touch my own domain classes".
Something like static mapWith = "none"
but in Application Config?
Asked
Active
Viewed 161 times
0

wwarlock
- 443
- 4
- 14
-
1How about moving your non-persisted classes to src/groovy ? – Raphael Jun 08 '14 at 13:47
-
No, I can't. As I wrote that is standalone plugin for several grails projects. – wwarlock Jun 08 '14 at 14:49
-
But the plugin can still contain the classes but in src/groovy no? – Graeme Rocher Jun 10 '14 at 07:16
-
I think it doesn't. Because all other applications need these classes as original domains. – wwarlock Jun 10 '14 at 10:58
-
Ok, please provide me the documentation, where described how to use the src/groovy classes (which located in plugin) the same way as the classic Grails domains. – wwarlock Jun 10 '14 at 11:01
-
Maybe you are didn't understand. I have the class which in the one case persisted and in another application doesn't. This class is allocated in the separate plugin. If I move this class to src/groovy then it disappeared from Gorm in both cases. In that case I need the instructions how to enable that class in application where it required. – wwarlock Jun 10 '14 at 13:26