Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *commented* on HHH-16537 (
https://hibernate.atlassian.net/browse/HHH-16537?atlOrigin=eyJpIjoiYjdkOG...
)
Re: Wrong SQL generated when root join is not used in sub-query (
https://hibernate.atlassian.net/browse/HHH-16537?atlOrigin=eyJpIjoiYjdkOG...
)
Did Hibernate 5 reuse the root query’s a.entityB join in the subquery too? If that’s what
you’re trying to achieve, I think using the join’s alias in the subquery is the only
correct syntax.
I also believe that 6 behaves correctly, it creates a new (cross) join for the subquery
since you’re specifying the full a.entityB.reference path: with a being in the root query,
we can’t reuse its joins for correlated subqueries.
(
https://hibernate.atlassian.net/browse/HHH-16537#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16537#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:f83bc8f )