HQL ORDER BY descending component is not generated properly; DESC is only applied to the last component column

Description

HQL ORDER BY descending component is not generated properly; DESC is only applied to the last component column.

For example:

HQL: select z.name, z.address from org.hibernate.test.hql.Zoo z order by z.address DESC, z.name DESC
SQL: select
zoo0_.name as col_0_0_,
zoo0_.street as col_1_0_,
zoo0_.city as col_1_1_,
zoo0_.postalCode as col_1_2_,
zoo0_.country as col_1_3_,
zoo0_.state_prov_id as col_1_4_
from
Zoo zoo0_
order by
zoo0_.street,
zoo0_.city,
zoo0_.postalCode,
zoo0_.country,
zoo0_.state_prov_id DESC,
zoo0_.name DESC

Environment

None

Status

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure