aggregate = readFromRowIntoObject(row, null, targetObject, null, query, query.getSession(), true);
} else {
if(changeSet != null) {
aggregateChangeSet = getReferenceDescriptor(aggregate, query.getSession()).getObjectBuilder().createObjectChangeSet(aggregate, (UnitOfWorkChangeSet)((UnitOfWorkImpl)query.getSession()).getUnitOfWorkChangeSet(), true, query.getSession());
}
AbstractRecord aggregateRow = new DatabaseRecord();
int size = row.size();
List fields = row.getFields();
List values = row.getValues();
List aggregateFields = getReferenceFields();
for(int i=0; i < size; i++) {
DatabaseField field = (DatabaseField)fields.get(i);
if(aggregateFields.contains(field)) {
aggregateRow.add(field, values.get(i));
}
}
getObjectBuilder(aggregate, query.getSession()).assignReturnRow(aggregate, query.getSession(), aggregateRow, aggregateChangeSet);
}