// If it was a clone the change listener must be cleared.
if (wasAClone) {
policy.clearChanges(workingClone, unitOfWork, descriptor, isARefresh);
}
policy.enableEventProcessing(workingClone);
unitOfWork.getCloneMapping().put(workingClone, backupClone);
query.recordCloneForPessimisticLocking(workingClone, unitOfWork);
// PERF: Cache the primary key if implements PersistenceEntity.
if (workingClone instanceof PersistenceEntity) {
((PersistenceEntity)workingClone)._persistence_setId(primaryKey);