Subqueries in WITH/ON clause that reference other join nodes lead to invalid duplicate joins

Description

Subqueries in WITH/ON clause that reference other join nodes lead to invalid duplicate joins.

The HQL query:

Previously generated the following SQL:

As of 5.4.24 it instead produces:

The difference is:

I have a reproducer available at https://github.com/hibernate/hibernate-orm/compare/master...jwgmeligmeyling:reproducers-blaze-persisence-1237?expand=1

Environment

None

Activity

Show:
Christian Beikov
December 19, 2020, 1:38 PM

Duplicate of

Duplicate

Assignee

Christian Beikov

Reporter

Jan-Willem Gmelig Meyling

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.23

Affects versions

Priority

Major