Skip to content

Commit fc30edd

Browse files
gavinkingbeikov
authored andcommitted
HHH-18140 Skip optimizeUnloadedDelete if there are POST_COMMIT_DELETE listeners
Signed-off-by: Gavin King <[email protected]>
1 parent c5893e7 commit fc30edd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hibernate-core/src/main/java/org/hibernate/event/internal/DefaultDeleteEventListener.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ private static boolean hasCustomEventListeners(EventSource source) {
273273
// Bean Validation adds a PRE_DELETE listener
274274
// and Envers adds a POST_DELETE listener
275275
return fss.eventListenerGroup_PRE_DELETE.count() > 0
276+
|| fss.eventListenerGroup_POST_COMMIT_DELETE.count() > 0
276277
|| fss.eventListenerGroup_POST_DELETE.count() > 1
277278
|| fss.eventListenerGroup_POST_DELETE.count() == 1
278279
&& !(fss.eventListenerGroup_POST_DELETE.listeners().iterator().next()

0 commit comments

Comments
 (0)