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

fix: resolved wrong pagination info #17

Merged
merged 2 commits into from
Feb 24, 2024
Merged

Conversation

andrea-deri
Copy link
Contributor

This PR contains a fix made on pagination during the retrieve of the mock resources list. The fix provide the execution of a dedicated query for retrieve the total number of elements in the whole collection, resolving a bug that caused a wrong value for the count of elements in page.

List of Changes

  • Refactored query for get the count of all elements
  • Added new field for retrieve the total number of elements
  • Added @Indexed annotation on mock resource entity

Motivation and Context

This fix permits to resolve a little bug on pagination

How Has This Been Tested?

  • Tested in local environment

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

This pull request does not contain a valid label. Please add one of the following labels: [patch, ignore-for-release]

Copy link

Comment this PR with update_code to format the code. Consider to use pre-commit to format the code.

@andrea-deri andrea-deri merged commit 77b07a4 into main Feb 24, 2024
5 of 10 checks passed
@andrea-deri andrea-deri deleted the fix-getall-pagination branch February 24, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant