fix for GRAILS-9749 "Hibernate error when using namedQueries with multiple datasources"