Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-15905 (
https://hibernate.atlassian.net/browse/HHH-15905?atlOrigin=eyJpIjoiMGE4Nz...
)
Re: Hibernate 6 H2 dialect override Nulls precedence ignored (
https://hibernate.atlassian.net/browse/HHH-15905?atlOrigin=eyJpIjoiMGE4Nz...
)
Dialect#getNullOrdering returns the default ordering of null for the database. So if you
have values 1,null,2 and order by them, where does the DB put nulls by default. This is
used to determine when the SQL can omit the nulls clause. In H2, null is the smallest, so
the default implementation is to return SMALLEST , which means that order by x asc nulls
first or order by x desc nulls last would be simplified to simply order by x and order by
x desc.
What your seem to want is specifying the default null precedence, which can be configured
through hibernate.order_by.default_null_ordering , also see
https://docs.jboss.org/hibernate/orm/6.2/javadocs/org/hibernate/cfg/Avail...
(
https://docs.jboss.org/hibernate/orm/6.2/javadocs/org/hibernate/cfg/Avail...
).
(
https://hibernate.atlassian.net/browse/HHH-15905#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15905#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100213- sha1:1fa7b87 )