HHH-6999 optimization

don't need to run CHECK_ON_FLUSH with cascade=ALL,
since ALL includes PERSIST_ON_FLUSH

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-06-05 08:08:12 +02:00
parent fd248e9f6a
commit d54f71f81c
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ public final class CascadeStyles {
public static final CascadeStyle ALL_DELETE_ORPHAN = new BaseCascadeStyle() {
@Override
public boolean doCascade(CascadingAction action) {
return true;
return action != CascadingActions.CHECK_ON_FLUSH;
}
@Override
@ -53,7 +53,7 @@ public final class CascadeStyles {
public static final CascadeStyle ALL = new BaseCascadeStyle() {
@Override
public boolean doCascade(CascadingAction action) {
return true;
return action != CascadingActions.CHECK_ON_FLUSH;
}
@Override