Join on treated root not rendered in HQL

Description

When treating the root of a query as a subclass, joins on the treated root are not rendered in the resulting HQL, resulting in 'Invalid path' errors. For example, the following query:

Renders the following HQL:

The join to Smell is not part of the resulting query, causing the following stacktrace when trying to execute the query:

For this simple query, a work around is to start the query on SmellyCheese, eliminating the treat entirely, but in more complex situations (like dynamically generated queries), this is not always possible.

Environment

None

Status

Assignee

Unassigned

Reporter

Emond Papegaaij

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure