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
{{ message }}
Repository navigation
db-postgres: Pagination shows incorrect totalDocs after deletion using local API with user set #4581
When using PostgreSQL as database, deleting the only document from a collection using local API causes the immediately following find call return an incorrect totalDocs count (1 instead of 0). The problem is illustrated by a code snippet below:
Updated the example in the description, I originally copy-pasted the output from test using mongoose, which was correct output to pass the test, not the right one for this bug. Now there's example outputs while using Postgres adapter. It's noteworthy that the output seems to variate a bit. Sometimes the document is still in the result, sometimes not but totalDocs is still 1.
Activity
joas8211 commentedon Dec 21, 2023
Updated the example in the description, I originally copy-pasted the output from test using mongoose, which was correct output to pass the test, not the right one for this bug. Now there's example outputs while using Postgres adapter. It's noteworthy that the output seems to variate a bit. Sometimes the document is still in the result, sometimes not but totalDocs is still 1.
joas8211 commentedon Dec 21, 2023
I got it fixed, so no need to work on this. I'll open a PR.
github-actions commentedon Sep 7, 2024
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.