SubQuery in select clause with join with main table create wrong SQL

Description

I want to do a select with a subQuery joind with the main query in the select like this:

I use this code to do the select:

And get this SQL, that produce the correct result, but got an unnecasery join in the subquery. (formatted to make it more readable

I would expect it to be like this:

Environment

Oracle 11g, Hibernate 5.2.3

Status

Assignee

Unassigned

Reporter

Atle Tokle

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure