Skip to content

Conversation

@DavideD
Copy link
Member

@DavideD DavideD commented Dec 5, 2025

Fix #2873

This is a draft because it requires a release with hibernate/hibernate-orm#11382
It's already applied on the wip/4.2 branch

@DavideD DavideD added this to the 4.2.0.CR4 milestone Dec 5, 2025
@DavideD DavideD added bug Something isn't working waiting We are waiting for another PR or issue to be solved before merging this one 4.2 labels Dec 5, 2025
…tion

Sometimes, Hibernate ORM needs to flush the session before
executing a native query. This commit makes sure that a reactive
operation is executed instead of the blocking one from Hiberante ORM.
And test native queries without entities.
private CompletionStage<List<R>> doReactiveList() {
getSession().prepareForQueryExecution( requiresTxn( getQueryOptions().getLockOptions()
.findGreatestLockMode() ) );
getSession().prepareForQueryExecution( requiresTxn( getQueryOptions().getLockOptions().findGreatestLockMode() ) );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
LockOptions.findGreatestLockMode
should be avoided because it has been deprecated.
@DavideD DavideD marked this pull request as ready for review December 11, 2025 15:21
@DavideD DavideD merged commit 10605a2 into hibernate:main Dec 11, 2025
32 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.2 bug Something isn't working waiting We are waiting for another PR or issue to be solved before merging this one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non reactive method call error when running a native query

1 participant