Describe the bug
When writing JPQL similar to this:
SELECT o FROM SomeEntity o ORDER BY o.someNullableField NULLS FIRST
The query generated for SQLServer directly contains NULLS FIRST, which is not supported by SQLServer.
- EclipseLink version: 5.0.0.v202603230926-bc4f4eb36eb1dcce223533d87890ba458628a2f9
- Java/JDK version: N/A
- DataBase: SQLServer 2022
Additional context
Looks like the standard way of handling this is
https://stackoverflow.com/a/1456681
ORDER BY (CASE WHEN [Order] IS NULL THEN 0 ELSE 1 END), [Order]
Describe the bug
When writing JPQL similar to this:
The query generated for SQLServer directly contains
NULLS FIRST, which is not supported by SQLServer.Additional context
Looks like the standard way of handling this is
https://stackoverflow.com/a/1456681
ORDER BY (CASE WHEN [Order] IS NULL THEN 0 ELSE 1 END), [Order]