Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
burtbeckwith committed Jul 7, 2010
1 parent 5328230 commit 8fdbf12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Expand Up @@ -20,6 +20,8 @@
import org.apache.commons.logging.LogFactory;
import org.codehaus.groovy.control.CompilationFailedException;
import org.codehaus.groovy.grails.exceptions.GrailsConfigurationException;
import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder;
import org.codehaus.groovy.grails.orm.hibernate.cfg.PropertyConfig;
import org.codehaus.groovy.grails.validation.ConstrainedProperty;
import org.codehaus.groovy.grails.validation.ConstrainedPropertyBuilder;

Expand Down Expand Up @@ -352,8 +354,9 @@ public static Map evaluateConstraints(Object instance, GrailsDomainClassProperty
// Make sure all fields are required by default, unless
// specified otherwise by the constraints
// If the field is a Java entity annotated with @Entity skip this
PropertyConfig propertyConfig = GrailsDomainBinder.getPropertyConfig(p);
applyDefaultConstraints(propertyName, p, cp,
defaultConstraints, delegate.getSharedConstraint(propertyName));
defaultConstraints, delegate.getSharedConstraint(propertyName), propertyConfig);

}
}
Expand Down
Expand Up @@ -701,7 +701,7 @@ private static void bindCollectionForPropertyConfig(Collection collection, Prope
}
}

private static PropertyConfig getPropertyConfig(GrailsDomainClassProperty property) {
public static PropertyConfig getPropertyConfig(GrailsDomainClassProperty property) {
Mapping m = getMapping(property.getDomainClass().getClazz());
PropertyConfig config = m != null ? m.getPropertyConfig(property.getName()) : null;
return config;
Expand Down
Expand Up @@ -46,12 +46,6 @@ protected void setUp() throws Exception {
ExpandoMetaClass.enableGlobally();
}

@Override
protected void tearDown() throws Exception {
super.tearDown();
GrailsDomainBinder.namingStrategy = ImprovedNamingStrategy.INSTANCE;
}

public void testIsBasicType() {
assertTrue(GrailsDomainConfigurationUtil.isBasicType(boolean.class));
assertTrue(GrailsDomainConfigurationUtil.isBasicType(long.class));
Expand Down

0 comments on commit 8fdbf12

Please sign in to comment.