Skip to content

Commit 634d072

Browse files
committed
[#2055] Setting hibernate.query.mutation_strategy.global_temporary.create_tables to false has no effect
1 parent 42d5c04 commit 634d072

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,23 @@ default void prepare(MappingModelCreationProcess mappingModelCreationProcess, Jd
6565
if ( !createIdTables ) {
6666
tableCreatedStage.complete( null );
6767
}
68-
69-
LOG.debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
70-
71-
connectionStage()
72-
.thenCompose( this::createTable )
73-
.whenComplete( (connection, throwable) -> releaseConnection( connection )
74-
.thenAccept( v -> {
75-
if ( throwable == null ) {
76-
setDropIdTables( configService );
77-
tableCreatedStage.complete( null );
78-
}
79-
else {
80-
tableCreatedStage.completeExceptionally( throwable );
81-
}
82-
} )
83-
);
68+
else {
69+
LOG.debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
70+
71+
connectionStage()
72+
.thenCompose( this::createTable )
73+
.whenComplete( (connection, throwable) -> releaseConnection( connection )
74+
.thenAccept( v -> {
75+
if ( throwable == null ) {
76+
setDropIdTables( configService );
77+
tableCreatedStage.complete( null );
78+
}
79+
else {
80+
tableCreatedStage.completeExceptionally( throwable );
81+
}
82+
} )
83+
);
84+
}
8485
}
8586

8687
private CompletionStage<Void> releaseConnection(ReactiveConnection connection) {

0 commit comments

Comments
 (0)