Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWM4MjI5MDQy...
) / New Feature (
https://hibernate.atlassian.net/browse/HHH-16654?atlOrigin=eyJpIjoiNWM4Mj...
) HHH-16654 (
https://hibernate.atlassian.net/browse/HHH-16654?atlOrigin=eyJpIjoiNWM4Mj...
) auto-addition of joins to queries for EAGER to-one associations (
https://hibernate.atlassian.net/browse/HHH-16654?atlOrigin=eyJpIjoiNWM4Mj...
)
Issue Type: New Feature Assignee: Unassigned Components: query-hql Created: 21/May/2023
04:21 AM Priority: Major Reporter: Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
We have never added implicit joins to HQL/criteria queries for EAGER associations, since
for to-many associations that would change the semantics of the query.
But, we could in principle do it only for to-one associations. That would make your
program faster with little real downside.
See:
https://twitter.com/1ovthafew/status/1660238087325114368
Now, we definitely wouldn’t want to make a change like that by default , since in rare
cases it could break programs. And besides, I guess we want to experiment with it first;
it’s a pretty big change.
But we could add a setting to let people opt in.
WDYT?
(
https://hibernate.atlassian.net/browse/HHH-16654#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16654#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:9dd72a2 )