Check to ensure the child object returned is not null before adding to list of child objects to validate.
This commit is contained in:
parent
d6f2b136ec
commit
625efa4782
|
@ -122,8 +122,10 @@ public class IntrospectionManagerHibernate implements IntrospectionManager,
|
||||||
// only if a Validator is registered for that Object
|
// only if a Validator is registered for that Object
|
||||||
if (this.validationRegistryManager.findValidator(
|
if (this.validationRegistryManager.findValidator(
|
||||||
propertyType.getReturnedClass()) != null) {
|
propertyType.getReturnedClass()) != null) {
|
||||||
allObjects.add(classMetadata.getPropertyValue(
|
Object childObject = classMetadata.getPropertyValue(parentObject, propertyNames[i], EntityMode.POJO);
|
||||||
parentObject, propertyNames[i], EntityMode.POJO));
|
if (childObject != null) {
|
||||||
|
allObjects.add(childObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue