parse-community / parse-community/parse-server
Incorrect result from Parse.Query on Postgres
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
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
When I try to request some data, I got results which supposed not to be there
Steps to reproduce
let query = new Parse.Query('Foo');
let subquery = new Parse.Query('Bar');
subquery.contains('name', FILTER);
query.matchesQuery('bar', subquery);
The query result also includes all Foo-objects whose 'bar' field is undefined or null, regardless of the value of FILTER.
I think this is wrong behavior.
Server
- Parse Server version:
4.4.0 - Operating system:
Ubuntu 18.04 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Database
- System (MongoDB or Postgres):
Postgres - Database version:
10.6 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JS - SDK version:
2.17.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Parse.Query and matchesQuery example on PostgreSQL with null and undefined bar fields, then trace the PostgreSQL handling of the matchesQuery entry point. Compare the result with the expected FILTER behavior and add or update coverage so Foo objects without a matching bar are excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgres
- Domain
- backend-api-design, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100