From 138e0bba01203fa79cb312c00f7a43e091f93b26 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Fri, 3 May 2024 19:53:19 +0200 Subject: [PATCH] HHH-18023 treat LockMode.WRITE as similar to PESSIMISTIC_FORCE_INCREMENT consistent with the similar levels they have cc @beikov Signed-off-by: Gavin King --- .../java/org/hibernate/internal/util/LockModeConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/LockModeConverter.java b/hibernate-core/src/main/java/org/hibernate/internal/util/LockModeConverter.java index 7524c63cc9..8cc2ca99db 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/LockModeConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/LockModeConverter.java @@ -34,7 +34,6 @@ public final class LockModeConverter { return LockModeType.NONE; case OPTIMISTIC: return LockModeType.OPTIMISTIC; - case WRITE: // no exact equivalent in JPA case OPTIMISTIC_FORCE_INCREMENT: return LockModeType.OPTIMISTIC_FORCE_INCREMENT; case PESSIMISTIC_READ: @@ -43,6 +42,7 @@ public final class LockModeConverter { case UPGRADE_NOWAIT: case UPGRADE_SKIPLOCKED: return LockModeType.PESSIMISTIC_WRITE; + case WRITE: // no exact equivalent in JPA case PESSIMISTIC_FORCE_INCREMENT: return LockModeType.PESSIMISTIC_FORCE_INCREMENT; default: