Permalink
Browse files

fix for GRAILS-5156 and GRAILS-5158

  • Loading branch information...
graemerocher committed Nov 26, 2009
1 parent 0d38dce commit 009b8d86720b31f880cb49de0877385554bb24cd
@@ -137,12 +137,11 @@ class ClosureEventTriggeringInterceptor extends SaveOrUpdateEventListener implem
event.getState()[ArrayUtils.indexOf(event.persister.propertyNames, GrailsDomainClassProperty.LAST_UPDATED)] = now;
entity."$property.name" = now
}
+ if(!entity.validate(deepValidate:false)) {
+ result = true
+ }
}
-
- if(!entity.validate(deepValidate:false)) {
- result = true
- }
return result
}
@@ -99,24 +99,23 @@ public SessionFactory buildSessionFactory() throws HibernateException {
* domain classes
*/
protected void secondPassCompile() throws MappingException {
- if (configLocked) {
- return;
- }
- if(LOG.isDebugEnabled()) {
- LOG.debug("[GrailsAnnotationConfiguration] [" + this.domainClasses.size() + "] Grails domain classes to bind to persistence runtime");
- }
+ if (!configLocked) {
+ if(LOG.isDebugEnabled()) {
+ LOG.debug("[GrailsAnnotationConfiguration] [" + this.domainClasses.size() + "] Grails domain classes to bind to persistence runtime");
+ }
- // do Grails class configuration
- for (GrailsDomainClass domainClass : this.domainClasses) {
- GrailsDomainBinder.evaluateMapping(domainClass);
- }
+ // do Grails class configuration
+ for (GrailsDomainClass domainClass : this.domainClasses) {
+ GrailsDomainBinder.evaluateMapping(domainClass);
+ }
- // do Grails class configuration
- for (GrailsDomainClass domainClass : this.domainClasses) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("[GrailsAnnotationConfiguration] Binding persistent class [" + domainClass.getFullName() + "]");
+ // do Grails class configuration
+ for (GrailsDomainClass domainClass : this.domainClasses) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("[GrailsAnnotationConfiguration] Binding persistent class [" + domainClass.getFullName() + "]");
+ }
+ GrailsDomainBinder.bindClass(domainClass, super.createMappings());
}
- GrailsDomainBinder.bindClass(domainClass, super.createMappings());
}
// call super

0 comments on commit 009b8d8

Please sign in to comment.