-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-16710 implicit instantiation for HQL result types #6680
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
Conversation
|
||
This is bearable, but let's explore some other options. | ||
|
||
JPA lets us specify that we want each query result packaged as an instance of `javax.persistence.Tuple`. |
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.
jakarta.
perhaps instead of javax.
?
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.
yeah, thanks, I'm still in denial...
.getResultList(); | ||
for (var list : results) { | ||
String title = (String) list.get(0); | ||
String preamble = (String) tuple.get(1); |
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.
I assume tuple
should be list
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.
Indeed, thanks.
[source, java] | ||
[%unbreakable] | ||
---- | ||
var results = |
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.
IMO it would be nicer to have the full type instead of var
[source, java] | ||
[%unbreakable] | ||
---- | ||
var results = |
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.
IMO it would be nicer to have the full type instead of var
Map.class) | ||
.getResultList(); | ||
for (var map : results) { | ||
String title = (String) tuple.get("title"); |
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.
I assume map
instead of tupple
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.
Thanks.
Note that this PR was superseded by #6685. |
No description provided.