-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SelectionQuery/MutationQuery wherever possible in Panache + avoid warning HHH000104 #41547
Conversation
This comment has been minimized.
This comment has been minimized.
65355b3
to
777f10c
Compare
This comment has been minimized.
This comment has been minimized.
Because: 1. It's recommended practice. 2. It works around https://hibernate.atlassian.net/browse/HHH-18306
…simplify code Don't use a limit to avoid warnings such as: > HHH000104: firstResult/maxResults specified with collection fetch; applying in memory! Simplify code because... we can.
777f10c
to
f6630d1
Compare
Status for workflow
|
@@ -336,14 +335,9 @@ public <T extends Entity> T singleResult() { | |||
|
|||
@SuppressWarnings("unchecked") | |||
public <T extends Entity> Optional<T> singleResultOptional() { | |||
SelectionQuery hibernateQuery = createQuery(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, we were using a limit for singleResultOptional
, but not for singleResult
:|
🙈 The PR is closed and the preview is expired. |
Fixes quarkusio#42314 Introduced by quarkusio#41547
Fixes quarkusio#42314 Introduced by quarkusio#41547 (cherry picked from commit cf5f6bb)
Fixes quarkusio#42314 Introduced by quarkusio#41547
SelectionQuery
/MutationQuery
, which are the recommended way to create queries in Hibernate when using native APIs (Session
).Migration guide entry: