Update bad HQL query, was using SQL syntax