Performing a descending order by on a composite field generate the incorrect SQL for the query.
This will return the incorrect SQL:
Whereas I'd expect the SQL to be:
I've attached a test case to demonstrate the problem. This looks to be have been raised, and closed before as HHH-7025.
I have a fix for the org.hibernate.dialect.Dialect class, modifying the renderOrderByElement(...) method, and will raise a pull request for it soon.
Hibernate 5.2.12, Java 8
, is this related to something you're working on?
, at the moment I'm not working on anything related with this issue.