-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
Description
New Issue Checklist
- [x ] I am not disclosing a vulnerability.
- [x ] I am not just asking a question.
- [x ] I have searched through existing issues.
- [x ] I can reproduce the issue with the latest version of Parse Server.
Issue Description
Build a parse query that uses $relatedTo and count, in order to get results and total count.
Parse uses the "Limit" parameter value in order to limit the $relatedTo query, this causes a incorrect count value to be returned.
Steps to reproduce
await Parse.Query.fromJSON('ExampleClass',
{
"limit":15,
"skip:"0",
"where": {
"$relatedTo": {
"object": {
"__type": "Pointer",
"className": "RelatedClass",
"objectId": "someObjectId"
},
"key": "examples"
},
}
})
Actual Outcome
result = depends on order desc or asc, if valid document is in range (0-15) it will show, but if not it will not.
count = returns lower count than actual count of valid documents (14 when there are 33 for example)
Expected Outcome
result = should return all documents that match upto limit so paging can work properly.
count = should return total count of all matching documents, regardless of limit.
Environment
latest, 5.4.3
Server
- Parse Server version:
5.4.3
- Operating system:
ubuntu
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
monogdb
- Database version:
5.0
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
digitalocean
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
web
- SDK version:
rest
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed