Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-17028 (
https://hibernate.atlassian.net/browse/HHH-17028?atlOrigin=eyJpIjoiZWJhOD...
)
Re: Unrelated left join fails when query has multiple roots (
https://hibernate.atlassian.net/browse/HHH-17028?atlOrigin=eyJpIjoiZWJhOD...
)
This is not a bug, but simply the semantics of the query language. The from clause has
separate “spaces” which are separated syntactically by a comma. Every such “space” is
isolated. If you want to be able to refer to aliases of other root nodes, then you will
have to use a cross join instead.
entityManager.createQuery("""
select r.name, u.someValue, oe.id
from RootEntity r
cross join OtherEntity oe
left join UnrelatedEntity u on u.name = r.name
""").getResultList();
(
https://hibernate.atlassian.net/browse/HHH-17028#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-17028#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#100233- sha1:3ea1a2a )