HHH-16276 - More readable exception for non-compliant @OrderBy expressions
This commit is contained in:
parent
c7bc5bb6d2
commit
8678c661e6
|
@ -71,7 +71,7 @@ public class ParseTreeVisitor extends OrderingParserBaseVisitor<Object> {
|
|||
throw new OrderByComplianceViolation(
|
||||
String.format(
|
||||
Locale.ROOT,
|
||||
"`@OrderBy` expression (%s) is not a domain-model reference, which violates the Jakarta Persistence specification - %s",
|
||||
"@OrderBy expression (%s) is not a domain-model reference, which violates the Jakarta Persistence specification - %s",
|
||||
parsedSpec.expression().getText(),
|
||||
orderingExpression.toDescriptiveText()
|
||||
)
|
||||
|
|
|
@ -42,7 +42,7 @@ public class OrderByComplianceTests {
|
|||
}
|
||||
catch (OrderByComplianceViolation exception) {
|
||||
assertThat( exception.getMessage() ).isEqualTo(
|
||||
"`@OrderBy` expression (last_name) is not a domain-model reference " +
|
||||
"@OrderBy expression (last_name) is not a domain-model reference, " +
|
||||
"which violates the Jakarta Persistence specification - column reference (last_name)"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue