grails/grails-core — pull request #336 by longwa (2013-03-11 23:09:58+00:00)
Title: Fix issue where calling validate() after a domain class is reloaded with...

... hibernate.reload = false causes NPE

In testing the hibernate.reload = false changes, I found that validate() throws an NPE b/c the GrailsDomainClass reference is not valid unless the Validator bean is registered again. This change moves the Validator re-register out of the check for reloading. In my testing, it didn't add any significant time to the reload and I was able to reload and save(), get(), etc. the class with no problems.