Skip to content
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

SearchParameters sorting doesn't work. #7

Open
denizque opened this issue May 29, 2018 · 0 comments
Open

SearchParameters sorting doesn't work. #7

denizque opened this issue May 29, 2018 · 0 comments

Comments

@denizque
Copy link

When using Controllers and overriding defaultOrder method to define custom ordering it doesn't work.

protected SearchParameters defaultOrder(SearchParameters searchParameters) {
}

I analyzed the code and the cause is in SearchParameters class.
There is a set defined for order by.
private Set<OrderBy> orders = newHashSet();

The solution for this issue is by initializing the set as linked hash set.
therefore
private Set<OrderBy> orders = newLinkedHashSet();

solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant