Project: Grails

Revision: 7279

Author: pledbrook

Date: 11 Aug 2008 13:23:46

Changes:

GRAILS-2741: Custom constraints provided by plugins are not available
when domain classes are initially processed (unless the plugin is loaded
before the domain class plugin), so the domain class constraints are
"refreshed" after all the plugins have loaded. The constraints of
embedded domain classes, though, weren't refreshed and so custom
constraints were not being triggered by the validation.

Now the DefaultGrailsDomainClass.refreshConstraints() method manually
refreshes the constraints of any component/embedded properties.

Files:
modified: /trunk/grails/src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClassProperty.java (try)
modified: /trunk/grails/test/groovy/org/codehaus/groovy/grails/orm/hibernate/ComponentValidationTests.groovy (try)
modified: /trunk/grails/src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsDomainClass.java (try)
Diff: To list