Closed blackbaud-alanacable closed 4 years ago
@blackbaud-alanacable Great, thanks for reporting issue with detailed description even workaround, interested in opening a pull request to fix this?
Sure. I can do that in a few days.
I created a PR (https://github.com/Microsoft/spring-data-cosmosdb/pull/364). I am getting an error java.lang.IllegalArgumentException: cosmosdb host key should have text!
when it runs in the CI. What do I need to do to get the tests to run in travis?
@blackbaud-alanacable Thanks for the quick fix, the travis CI will break when it's a forked repo, I have just added you as a collaborator and you should receive an invitation link. Please create a new branch under this repo directly and open a new pull request, to pass the TravisCI.
Thanks @sophiaso. I closed the original PR and opened a new one (https://github.com/Microsoft/spring-data-cosmosdb/pull/365) as a branch on this repo.
@sophiaso I was also wondering if I could be added as a collaborator. I have a PR I would like to raise as well, just wasn't sure where the best place to reach out was.
@Blackbaud-ErikBudtke done, please help to check invite link from you email.
@Incarnation-p-lee Seems like the work for this issue is now completed. Can we close it ?
yes, we can close the issue. thank you.
When using Pagination with Sorting, only the first page is sorted. The rest of the pages are unsorted. For example, a list with 5 elements, starting from page1
Page<SiteUserEntity> page = repository.findAll(DocumentDbPageRequest.of(1, 2, Sort.Direction.ASC, "email"))
The elements of the first page will be sorted by email. To request the second pagePage<SiteUserEntity> page2 = repository.findAll(page.getPageable())
The elements of the second page will be unsorted.Looking at
DocumentDbTemplate.paginationQuery
the next pageRequest is constructed asfinal DocumentDbPageRequest pageRequest = DocumentDbPageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), response.getResponseContinuation());
. The Sort information from the first request is not passed into the next page request.I am able to work around it by constructing a new PageRequest for page2 via
However it would be nice if the Sort was made part of the next PageRequest in
DocumentDbTemplate
.Thanks, Alana