[hibernate-issues] [JIRA] (HHH-16949) QueryException: Parameter 1 of function max() has type COMPARABLE