Open
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
Querying using "containedIn" in deep nested objects using pointers doesn't seems to work.
Steps to reproduce
See example below.
Actual Outcome
The queries return empty arrays.
Expected Outcome
We expected an array of Parse.Object .
Failing Test Case / Pull Request
- 🤩 I submitted a PR with a fix and a test case.
- 🧐 I submitted a PR with a failing test case.
To reproduce the issue, I added this at the end of ParseQuery.spec.js
it('deeply nested Pointers (issue #7413)', async function (done) {
const parent = new Parse.Object('Parent');
const child1 = new Parse.Object('Child');
const child2 = new Parse.Object('Child');
parent.set('children', [
{ child: child1, count: 2 },
{ child: child2, count: 3 },
]);
await parent.save();
const results = await new Parse.Query('Parent')
.containedIn('children.child', [child1])
.find();
expect(results.length).toBe(1);
done();
});
This test passes if I replace the line :
.containedIn('children.child', [child1])
by
.containedIn('children.child.objectId', [child1.id])
Environment
parse-server 4.5.0
Server
- Parse Server version: 4.5.0
- Operating system: Windows and debian
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local Windows and Google App Engine
Database
- System (MongoDB or Postgres): MongoDB
- Database version: 4.4.6
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local and MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc): Javascript
- SDK version: 3.2
Logs
Metadata
Metadata
Assignees
Labels
No labels