-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
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
Value of sort
attribute in @SortDefault
should parse the direction from the property
#2810
Comments
It seems that, following codes goes wrong, @SortDefault(sort = {
"a,desc", "b,desc"
})
final Pageable pageable while the following codes works @SortDefault(sort = "a", direction = Sort.Direction.DESC)
@SortDefault(sort = "b", direction = Sort.Direction.DESC)
final Pageable pageable |
Can you elaborate why you expect the annotation attribute to be parsed? The Javadoc clearly states that |
sort
attribute in @SortDefault
should parse the direction from the property
Maybe I'm confused, in which case, the @SortDefault(
sort = {"a", "b"},
direction = Sort.Direction.DESC
) Is above annotation is effectively equivalent to @SortDefault(sort = "a", direction = Sort.Direction.DESC)
@SortDefault(sort = "b", direction = Sort.Direction.DESC) ? Thanks. |
Yes, it is. You're referencing two different things here. One is the documentation of our default URI parameter value format and the other is the declaration of the annotation on the controller method parameter. |
When requested with
(property,direction)+
, theSort
seems not handle it.with,
The
PropertyPath
class takes the whole value(e.g.a,asc
) as a property name.The text was updated successfully, but these errors were encountered: