Incorrect total in paging results from OffsetByPageNumberSpecification #408
Labels
bug
Something isn't working
help wanted
Extra attention is needed
up-for-grabs 🙏🏽
Happy to consider a pull review to address this issue
Describe the bug
When using the OffsetByPageNumberSpecification I've found that the total count returned does not reflect the total amount of items.
As we can see in the above query, the total number of items is 6 yet the total has been calculated as 67.
To Reproduce
Expected behavior
Total returned should be equal to the number of items of that type in the container
Actual behavior
Total returned will be equal to all the items in the container.
Additional context
The problem seems to stem from the count query being built without adding an additional filter for the "Type". There is obviously a simple workaround to this, modify every query to also include the type filter. However, this is implicitly done everywhere else by this package, so for that reason I deem this a bug.
The text was updated successfully, but these errors were encountered: