If childObject is a collection, add the objects in the collection.

This commit is contained in:
Matthew Porter 2005-12-28 20:59:53 +00:00
parent e37cdd3f7d
commit 53dcdf7e89
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}
}
}
}