From a347cd8098fdbf14a208367aa9c397512c948adb Mon Sep 17 00:00:00 2001 From: Gavin Date: Sat, 13 May 2023 20:15:33 +0200 Subject: [PATCH] fix incorrect javadoc of FlushMode --- .../main/java/org/hibernate/FlushMode.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/FlushMode.java b/hibernate-core/src/main/java/org/hibernate/FlushMode.java index 54f0a5f693..07e6583be2 100644 --- a/hibernate-core/src/main/java/org/hibernate/FlushMode.java +++ b/hibernate-core/src/main/java/org/hibernate/FlushMode.java @@ -34,20 +34,27 @@ public enum FlushMode { /** * The {@link Session} is flushed when {@link Transaction#commit()} - * is called. + * is called. It is never automatically flushed before query + * execution. + * + * @see FlushModeType#COMMIT */ COMMIT, /** - * The {@link Session} is sometimes flushed before query execution - * in order to ensure that queries never return stale state. This - * is the default flush mode. + * The {@link Session} is flushed when {@link Transaction#commit()} + * is called, and is sometimes flushed before query execution in + * order to ensure that queries never return stale state. This is + * the default flush mode. + * + * @see FlushModeType#AUTO */ AUTO, /** - * The {@link Session} is flushed before every query. This is almost - * always unnecessary and inefficient. + * The {@link Session} is flushed when {@link Transaction#commit()} + * is called and before every query. This is usually unnecessary and + * inefficient. */ ALWAYS;