If childObject is a collection, add the objects in the collection.
This commit is contained in:
parent
e37cdd3f7d
commit
53dcdf7e89
|
@ -127,7 +127,11 @@ public class IntrospectionManagerHibernate implements IntrospectionManager,
|
|||
propertyType.getReturnedClass()) != null) {
|
||||
Object childObject = classMetadata.getPropertyValue(parentObject, propertyNames[i], EntityMode.POJO);
|
||||
if (childObject != null && Hibernate.isInitialized(childObject)) {
|
||||
allObjects.add(childObject);
|
||||
if (childObject instanceof Collection) {
|
||||
allObjects.addAll((Collection)childObject);
|
||||
} else {
|
||||
allObjects.add(childObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue