You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to call the method findAll(Pageable pageable) on a MongoRepository instance with the following pageable: Pageable.unpaged(sort)
When looking at the data i saw that the sort order was ignored completely.
After digging through the sources I think the issues lies in Query.java
publicQuerywith(Pageablepageable) {
if (pageable.isUnpaged()) {
returnthis; // <--- Here the sort is being ignored
}
this.limit = pageable.toLimit();
this.skip = pageable.getOffset();
returnwith(pageable.getSort());
}
As a work around i use PageRequest.of(0, Integer.MAX_VALUE, sort) but would be nice if this could be changed as it's not something you would expect