[hibernate-issues] [JIRA] (HHH-12076) Query not built properly when joining a table based on class