Descending "order by" on composite fields in HQL generates corresponding SQL "order by" incorrectly

Description

Performing a descending order by on a composite field generate the incorrect SQL for the query.

For example:

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.
Thanks

Environment

Hibernate 5.2.12, Java 8

Activity

Show:
Gail Badner
January 23, 2018, 2:09 AM

, is this related to something you're working on?

Andrea Boriero
January 23, 2018, 10:31 AM

, at the moment I'm not working on anything related with this issue.

Assignee

Unassigned

Reporter

Harry Austin

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure