CASE WHEN ... THEN ... END (SQL clause) in @org.hibernate.annotations.OrderBy throws exception

Description

Simple scenario: a club has multiple (sports) teams, a team being identified by its club ID plus a so-called team type code, e.g. "O20M" (over 20 male), "O35M" (over 35 male), ... "U14F" (under 14 female).

These teams want to be sorted in a special way, see order above. Full details see PR for test case coming.

Mappings:

Club.java (with minimal @OrderBy to break, full code in PR):

Team.java:

TeamPk.java:

When deploying/running the Hibernate test (PR coming, I need an HHH number first), an exception gets thrown:

This is all JPA, except for the @org.hibernate.annotations.OrderBy annotation.

Please fix.

Environment

Hibernate ORM test suite

Activity

Show:
Ka Wu
January 6, 2021, 11:24 PM

PR added:

Assignee

Unassigned

Reporter

Ka Wu

Fix versions

None

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Priority

Major
Configure