CriteriaQuery with correlated subquery can't be reused after execution

Description

Spec 6.8

It looks like executing a CriteriaQuery stores some resolved alias for entity types in the CriteriaQuery instance.

The correct subquery:

The broken subquery:

Environment

None

Status

Assignee

Unassigned

Reporter

Christian Bauer

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure