if (cacheKey != null) {
original = cacheKey.getObject();
}
}
ObjectBuilder builder = descriptor.getObjectBuilder();
Object implementation = builder.unwrapObject(clone, unitOfWork);
// If the cache key was missing check the cache.
// This occurs in the old merge, or if a new or changed object references an existing object that needs to be merged.
if (cacheKey == null) {
// #2 - old merge, #3 - nested, #6 referenced objects, #7 detached objects, #8 protected cache
cacheKey = targetSession.getCacheKeyFromTargetSessionForMerge(implementation, builder, descriptor, this);