Here is excerpt from the HQL that we are using (that worked properly in 3.2.7):
Here is the resulting SQL that is produced:
The error message we are seeing is:
ERROR: missing FROM-clause entry for table "extensions7_1_"
I am fully aware that the 'with' attribute has been deprecated in favour of the 'type' attribute, but this query did get generated properly in 3.2.7, and now in 5.2.9 it does not.