SELECT expressions are duplicated sometimes with a LoadGraph

Description

For example, running org.hibernate.jpa.test.graphs.queryhint.QueryHintEntityGraphTest#testLoadGraph multiple times, the generated SQL can be either of the following:

or

Notice that in the second statement, the following SELECT expressions are duplicated:

I see the same issue for #testLoadGraphOrderByWithImplicitJoin and #testLoadGraphWithRestriction.

The repeated expressions all involve the table, Company_markets, for Company#markets.

I believe repeated column aliases may cause problems with some dialects.

Environment

None

Assignee

Unassigned

Reporter

Gail Badner

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major
Configure