ObjectChangeSet changeSet = query.getObjectChangeSet();
if ((changeSet != null) && (!changeSet.isNew())) {
List changeRecords = changeSet.getChanges();
int size = changeRecords.size();
for (int index = 0; index < size; index++) {
ChangeRecord record = (ChangeRecord)changeRecords.get(index);
record.getMapping().preUpdate(query);
}
} else {
List<DatabaseMapping> mappings = builder.getRelationshipMappings();
int size = mappings.size();
for (int index = 0; index < size; index++) {