if (!commitManager.isShallowCommitted(object)) {
getQueryMechanism().updateForeignKeyFieldBeforeDelete();
if ((descriptor.getHistoryPolicy() != null) && descriptor.getHistoryPolicy().shouldHandleWrites()) {
descriptor.getHistoryPolicy().postUpdate(this);
}
commitManager.markShallowCommit(object);
}
return object;
}
commitManager.markPreModifyCommitInProgress(getObject());
if (!isUnitOfWork) {