[hibernate-issues] [JIRA] (HHH-2577) HQL: "select count(e.collection) from MyEntity e" produces wrong SQL