if (descriptor.shouldUseFullChangeSetsForNewObjects() || descriptor.isAggregateDescriptor()) {
List mappings = descriptor.getMappings();
int size = mappings.size();
for (int index = 0; index < size; index++) {
DatabaseMapping mapping = (DatabaseMapping)mappings.get(index);
changes.addChange(mapping.compareForChange(clone, null, changes, (UnitOfWorkImpl)session));
}
}
}
// The following code deals with reads that force changes to the flag associated with optimistic locking.