Skip to content

Commit 4fafc7b

Browse files
committed
Fix
1 parent 2ebc35b commit 4fafc7b

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/mutation/internal/temptable/ReactiveSoftDeleteExecutionDelegate.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/* Hibernate, Relational Persistence for Idiomatic Java
2+
*
3+
* SPDX-License-Identifier: Apache-2.0
4+
* Copyright: Red Hat Inc. and Hibernate Authors
5+
*/
16
package org.hibernate.reactive.query.sqm.mutation.internal.temptable;
27

38
import java.util.ArrayList;

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/mutation/internal/temptable/ReactiveTableBasedDeleteHandler.java

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,26 @@ public ReactiveTableBasedDeleteHandler(
5656
@Override
5757
public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext executionContext) {
5858
if ( LOG.isTraceEnabled() ) {
59-
LOG.tracef(
60-
"Starting multi-table delete execution - %s",
61-
getSqmDeleteOrUpdateStatement().getRoot().getModel().getName()
62-
);
59+
LOG.tracef( "Starting multi-table delete execution - %s", getSqmDeleteOrUpdateStatement().getRoot().getModel().getName() );
6360
}
6461
return resolveDelegate( executionContext ).reactiveExecute( executionContext );
6562
}
6663

6764
protected ReactiveExecutionDelegate resolveDelegate(DomainQueryExecutionContext executionContext) {
6865
if ( getEntityDescriptor().getSoftDeleteMapping() != null ) {
69-
// TODO : implement a reactive version of SoftDeleteExecutionDelegate
66+
return new ReactiveSoftDeleteExecutionDelegate(
67+
getEntityDescriptor(),
68+
getIdTable(),
69+
getTemporaryTableStrategy(),
70+
isForceDropAfterUse(),
71+
getSqmDeleteOrUpdateStatement(),
72+
getDomainParameterXref(),
73+
executionContext.getQueryOptions(),
74+
executionContext.getSession().getLoadQueryInfluencers(),
75+
executionContext.getQueryParameterBindings(),
76+
getSessionUidAccess(),
77+
getSessionFactory()
78+
);
7079
}
7180
return new ReactiveRestrictedDeleteExecutionDelegate(
7281
getEntityDescriptor(),
@@ -75,10 +84,10 @@ protected ReactiveExecutionDelegate resolveDelegate(DomainQueryExecutionContext
7584
isForceDropAfterUse(),
7685
getSqmDeleteOrUpdateStatement(),
7786
getDomainParameterXref(),
78-
getSessionUidAccess(),
7987
executionContext.getQueryOptions(),
8088
executionContext.getSession().getLoadQueryInfluencers(),
8189
executionContext.getQueryParameterBindings(),
90+
getSessionUidAccess(),
8291
getSessionFactory()
8392
);
8493
}

0 commit comments

Comments
 (0)