Skip to content

Commit a3f7026

Browse files
committed
[#1658] Upgrade Hibernate ORM to 6.2.5.Final
1 parent 2a0bc5f commit a3f7026

File tree

6 files changed

+10
-23
lines changed

6 files changed

+10
-23
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ version = projectVersion
5353
// ./gradlew clean build -PhibernateOrmVersion=5.6.15-SNAPSHOT
5454
ext {
5555
if ( !project.hasProperty('hibernateOrmVersion') ) {
56-
hibernateOrmVersion = '6.2.4.Final'
56+
hibernateOrmVersion = '6.2.5.Final'
5757
}
5858
if ( !project.hasProperty( 'hibernateOrmGradlePluginVersion' ) ) {
5959
// Same as ORM as default

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/iternal/ReactiveSimpleDeleteQueryPlan.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,8 @@ public <T> MappingModelExpressible<T> getResolvedMappingModelType(SqmParameter<T
172172
sqmInterpretation.getSqlExpressionResolver(),
173173
factory
174174
);
175-
matchingIdSubQuery.getSelectClause().addSqlSelection( new SqlSelectionImpl(
176-
1,
177-
0,
178-
fkTargetColumnExpression
179-
) );
175+
matchingIdSubQuery.getSelectClause()
176+
.addSqlSelection( new SqlSelectionImpl( 0, fkTargetColumnExpression ) );
180177

181178
matchingIdSubQuery.getFromClause().addRoot(
182179
tableGroup

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/mutation/internal/cte/ReactiveAbstractCteMutationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ default CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exe
152152
( (SqlExpressible) count ).getJdbcMapping()
153153
)
154154
);
155-
querySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 1, 0, count ) );
155+
querySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 0, count ) );
156156
querySpec.getFromClause().addRoot(
157157
new CteTableGroup(
158158
new NamedTableReference(

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/mutation/internal/cte/ReactiveCteInsertHandler.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exec
224224
if ( !assignsId && entityDescriptor.getGenerator().generatedOnExecution() ) {
225225
querySpec.getSelectClause().addSqlSelection(
226226
new SqlSelectionImpl(
227-
1,
228227
0,
229228
SqmInsertStrategyHelper.createRowNumberingExpression(
230229
querySpec,
@@ -254,7 +253,6 @@ public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exec
254253
columnNames.add( columnReference.getColumnExpression() );
255254
querySpec.getSelectClause().addSqlSelection(
256255
new SqlSelectionImpl(
257-
1,
258256
0,
259257
columnReference.getQualifier().equals( valuesAlias )
260258
? columnReference
@@ -362,7 +360,6 @@ public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exec
362360
);
363361
rowsWithSequenceQuery.getSelectClause().addSqlSelection(
364362
new SqlSelectionImpl(
365-
1,
366363
0,
367364
rowNumberColumnReference
368365
)
@@ -373,7 +370,6 @@ public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exec
373370
);
374371
rowsWithSequenceQuery.getSelectClause().addSqlSelection(
375372
new SqlSelectionImpl(
376-
2,
377373
1,
378374
new SelfRenderingSqlFragmentExpression( fragment )
379375
)
@@ -444,7 +440,6 @@ public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exec
444440
entityQuery.getFromClause().addRoot( baseTableGroup );
445441
entityQuery.getSelectClause().addSqlSelection(
446442
new SqlSelectionImpl(
447-
1,
448443
0,
449444
new BinaryArithmeticExpression(
450445
new ColumnReference(
@@ -488,7 +483,6 @@ public CompletionStage<Integer> reactiveExecute(DomainQueryExecutionContext exec
488483
final CteColumn cteColumn = cteColumns.get( i );
489484
entityQuery.getSelectClause().addSqlSelection(
490485
new SqlSelectionImpl(
491-
i + 1,
492486
i,
493487
new ColumnReference(
494488
"e",
@@ -559,7 +553,7 @@ else if ( !assignsId && entityDescriptor.getGenerator().generatedOnExecution() )
559553
final Expression count = createCountStar( factory, sqmConverter );
560554
domainResults
561555
.add( new BasicResult<>( 0, null, ( (SqlExpressible) count ).getJdbcMapping() ) );
562-
querySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 1, 0, count ) );
556+
querySpec.getSelectClause().addSqlSelection( new SqlSelectionImpl( 0, count ) );
563557
querySpec.getFromClause().addRoot(
564558
new CteTableGroup(
565559
new NamedTableReference(

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ public static CompletionStage<Integer> saveMatchingIdsIntoIdTable(
104104
matchingIdSelection.getFromClause().addRoot( mutatingTableGroup );
105105

106106
mutatingEntityDescriptor.getIdentifierMapping().forEachSelectable(
107-
(jdbcPosition, selection) -> {
107+
(selectionIndex, selection) -> {
108108
final TableReference tableReference = mutatingTableGroup.resolveTableReference(
109109
mutatingTableGroup.getNavigablePath(),
110110
selection.getContainingTableExpression()
111111
);
112112
matchingIdSelection.getSelectClause().addSqlSelection(
113113
new SqlSelectionImpl(
114-
jdbcPosition,
115-
jdbcPosition + 1,
114+
selectionIndex + 1,
116115
sqmConverter.getSqlExpressionResolver().resolveSqlExpression(
117116
tableReference,
118117
selection
@@ -127,7 +126,6 @@ public static CompletionStage<Integer> saveMatchingIdsIntoIdTable(
127126
matchingIdSelection.getSelectClause().addSqlSelection(
128127
new SqlSelectionImpl(
129128
jdbcPosition,
130-
jdbcPosition + 1,
131129
new QueryLiteral<>(
132130
UUID.fromString( sessionUidAccess.apply( executionContext.getSession() ) ),
133131
(BasicValuedMapping) idTable.getSessionUidColumn().getJdbcMapping()
@@ -219,6 +217,7 @@ public static QuerySpec createIdTableSelectQuerySpec(
219217
return querySpec;
220218
}
221219

220+
// TODO: I think we can reuse the method in ExecuteWithTemporaryTableHelper
222221
private static void applyIdTableSelections(
223222
QuerySpec querySpec,
224223
TableReference tableReference,
@@ -232,7 +231,6 @@ private static void applyIdTableSelections(
232231
if ( temporaryTableColumn != idTable.getSessionUidColumn() ) {
233232
querySpec.getSelectClause().addSqlSelection(
234233
new SqlSelectionImpl(
235-
i + 1,
236234
i,
237235
new ColumnReference(
238236
tableReference,
@@ -251,7 +249,6 @@ private static void applyIdTableSelections(
251249
(i, selectableMapping) -> {
252250
querySpec.getSelectClause().addSqlSelection(
253251
new SqlSelectionImpl(
254-
i + 1,
255252
i,
256253
new ColumnReference(
257254
tableReference,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,8 @@ private CompletionStage<Integer> executeInsert(
273273
// And transform assignments to target column references and selections
274274
for ( Assignment assignment : assignments ) {
275275
targetColumnReferences.addAll( assignment.getAssignable().getColumnReferences() );
276-
insertSourceSelectQuerySpec.getSelectClause().addSqlSelection(
277-
new SqlSelectionImpl( 0, -1, assignment.getAssignedValue() )
278-
);
276+
insertSourceSelectQuerySpec.getSelectClause()
277+
.addSqlSelection( new SqlSelectionImpl( assignment.getAssignedValue() ) );
279278
}
280279

281280
final InsertSelectStatement insertSqlAst = new InsertSelectStatement( targetTableReference );

0 commit comments

Comments
 (0)