| A simple from.fetch("user"); is’t enougth, the fetch join has to be usesd in the query instead of the join and must be casted: query.orderBy(cb.asc(((Join<?, ?>) from.fetch("user")).get("name"))); instead of: query.orderBy(cb.asc(from.join("user").get("name"))); It would be rather nice if hibernate could do the resulting select on the field if the query is distinct and has an order by joined attribute. So other abstractions like spring data, which add joins by path for sorting in pages could rely on it |