// care
// of when we process relationships
Iterator i = this.rootObject.getType().getProperties().iterator();
while (i.hasNext()) {
Property p = (Property) i.next();
if (p.isContainment() && p.getType().equals(tableClass)) {
if (p.isMany()) {
rootObject.getList(p).add(obj);
} else {
this.rootObject.set(p, obj);
}
}
}
Iterator columnNames = resultMetadata.getPropertyNames(tableData.getTableName()).iterator();
while (columnNames.hasNext()) {
String propertyName = (String) columnNames.next();
Property p = findProperty(obj.getType(), propertyName);
if (p == null) {
throw new RuntimeException("Type " + obj.getType().getName()
+ " does not contain a property named " + propertyName);
}