Hi All,
I am experiencing the same issue using a Criteria SQL restriction with a non root alias that has been previously raised in
HHH-2952. The issue is resolved as rejected.
The suggested change would work perfectly for me. What is the etiquette? can I go ahead and sign up for an account and reopen the Jira?
I have looked at creating the patch, I can see that org.hibernate.criterion.SQLCriterion.toSqlString() substitutes the {alias} placeholder but because the class CriteriaQuery does not expose a method to get a non root aliases it doesn't look like a trivial patch to implement.
My current workaround is to print the SQL for my query, and use the generated alias in my SQL restriction (hoping it doesn't change).