Skip to content

Commit 9ee1de8

Browse files
committed
better-document an extremely mysterious and misnamed setting
is this thing even still needed?
1 parent d9571e7 commit 9ee1de8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,13 @@ public interface AvailableSettings
159159
String MERGE_ENTITY_COPY_OBSERVER = "hibernate.event.merge.entity_copy_observer";
160160

161161
/**
162-
* When enabled, specifies that the persistent context should be discarded when either
163-
* {@link org.hibernate.Session#close()} or {@link jakarta.persistence.EntityManager#close()}
164-
* is called.
162+
* When enabled, specifies that all transactional resources should be immediately
163+
* released when {@link org.hibernate.Session#close()} is called.
165164
*
166-
* @settingDefault {@code false} (not discarded) per the JPA specification.
165+
* @settingDefault {@code false} (not released), as per the JPA specification.
166+
*
167+
* @apiNote The legacy name of this setting is extremely misleading;
168+
* it has little to do with persistence contexts.
167169
*/
168170
String DISCARD_PC_ON_CLOSE = "hibernate.discard_pc_on_close";
169171

0 commit comments

Comments
 (0)