if (commitManager.isProcessedCommit(object)) {
return object;
}
commitManager.markPreModifyCommitInProgress(getObject());
if (!isUnitOfWork) {
session.beginTransaction();
}
ClassDescriptor descriptor = getDescriptor();
DescriptorEventManager eventManager = descriptor.getEventManager();
// PERF: Avoid events if no listeners.
if (eventManager.hasAnyEventListeners()) {