We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Casey Link opened DATAREST-1098 and commented
It should be possible (or would be very nice!) to be able to specify the null handling when sorting a response with spring-data-rest.
This is quite important for our use cases, as we have some tables where nulls should be sorted last or first, depending on the specific field.
I see two possibilities here:
sort
?sort=name,desc,nullslast
QuerydslBinderCustomizer
QuerydslBindings
{ default void customize(QuerydslBindings bindings, QPerson person) { bindings.bind(person.name).sort().nullsLast(); }
Affects: 2.6.4 (Ingalls SR4)
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered:
Oliver Drotbohm commented
I like your phrasing of "it should be possible". It indeed should. Unfortunately with JPA, it isn't. See the link to the JPA Github above
Sorry, something went wrong.
member sound commented
Could you please add this as a feature? Using spring-data-rest is so nice, but lacking the possibility on how to sort nulls is crucial!
It would still be great investigating into this issue.
We did. And unfortunately nothing has changed in the mean time:
I like your phrasing of "it should be possible". It indeed should. Unfortunately with JPA, it isn't. See the link to the JPA Github above.
The upstream ticket for reference:
odrotbohm
No branches or pull requests
Casey Link opened DATAREST-1098 and commented
It should be possible (or would be very nice!) to be able to specify the null handling when sorting a response with spring-data-rest.
This is quite important for our use cases, as we have some tables where nulls should be sorted last or first, depending on the specific field.
I see two possibilities here:
sort
query param accepts an additional positional argument like?sort=name,desc,nullslast
QuerydslBinderCustomizer
andQuerydslBindings
are extended such that the sort details can be customized on the repository.Affects: 2.6.4 (Ingalls SR4)
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: