Fix for GRAILS-10252

See http://jira.grails.org/browse/GRAILS-10252 and https://github.com/grails-plugins/grails-hibernate-plugin/pull/2
Merge pull request #4 from cesarizu/patch-1

Fix for GRAILS-10252