Subquery cannot occur in select clause anymore for Criteria API

Description

Hello. Fix for introduces a major issue that makes the Subqueries in Selects unusable ("Subquery cannot occur in select clause" exception appears). Attached a test case. Assigning to the original fix author.

Environment

None

Status

Assignee

Guillaume Smet

Reporter

eXsio

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.3.7

Affects versions

5.4.0.CR1

Priority

Major