Skip to content

Commit 8a2bbe5

Browse files
committed
[#2227] Remove workaround for HHH-19386
The method getResultType doesn't return Void.class anymore. See https://hibernate.atlassian.net/browse/HHH-19386
1 parent 0c60e3e commit 8a2bbe5

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/session/impl/ReactiveSessionImpl.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,7 @@ public <R> ReactiveQuery<R> createReactiveQuery(TypedQueryReference<R> typedQuer
404404
}
405405
else if ( typedQueryReference instanceof MutationSpecificationImpl<?> specification ) {
406406
final CommonAbstractCriteria query = specification.buildCriteria( getCriteriaBuilder() );
407-
// Workaround for ORM, can be remove when this issue is solved: https://hibernate.atlassian.net/browse/HHH-19386
408-
final Class<R> type =
409-
specification.getResultType() == Void.class
410-
? null
411-
: (Class<R>) specification.getResultType();
412-
return new ReactiveQuerySqmImpl<>( (SqmStatement<R>) query, type, this );
407+
return new ReactiveQuerySqmImpl<>( (SqmStatement<R>) query, (Class<R>) specification.getResultType(), this );
413408
}
414409
else {
415410
@SuppressWarnings("unchecked")

hibernate-reactive-core/src/main/java/org/hibernate/reactive/session/impl/ReactiveStatelessSessionImpl.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,11 +942,7 @@ public <R> ReactiveQuery<R> createReactiveQuery(TypedQueryReference<R> typedQuer
942942
}
943943
if ( typedQueryReference instanceof MutationSpecificationImpl<?> specification ) {
944944
final CommonAbstractCriteria query = specification.buildCriteria( getCriteriaBuilder() );
945-
// Workaround for ORM, can be remove when this issue is solved: https://hibernate.atlassian.net/browse/HHH-19386
946-
Class<R> type = (Class<R>) specification.getResultType() == Void.class
947-
? null
948-
: (Class<R>) specification.getResultType();
949-
return new ReactiveQuerySqmImpl<>( (SqmStatement<R>) query, type, this );
945+
return new ReactiveQuerySqmImpl<>( (SqmStatement<R>) query, (Class<R>) specification.getResultType(), this );
950946
}
951947
@SuppressWarnings("unchecked")
952948
// this cast is fine because of all our impls of TypedQueryReference return Class<R>

0 commit comments

Comments
 (0)