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.