Skip to content

Commit f0d5cf7

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 ece64c7 commit f0d5cf7

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
@@ -276,6 +276,7 @@ private static boolean hasCustomEventListeners(EventSource source) {
276276
// Bean Validation adds a PRE_DELETE listener
277277
// and Envers adds a POST_DELETE listener
278278
return fss.eventListenerGroup_PRE_DELETE.count() > 0
279+
|| fss.eventListenerGroup_POST_COMMIT_DELETE.count() > 0
279280
|| fss.eventListenerGroup_POST_DELETE.count() > 1
280281
|| fss.eventListenerGroup_POST_DELETE.count() == 1
281282
&& !(fss.eventListenerGroup_POST_DELETE.listeners().iterator().next()

0 commit comments

Comments
 (0)