Skip to content

includeAll() includes first layer of nested children objects, not multiple #1336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TravisDev opened this issue Apr 7, 2021 · 3 comments · Fixed by #1337
Closed

includeAll() includes first layer of nested children objects, not multiple #1336

TravisDev opened this issue Apr 7, 2021 · 3 comments · Fixed by #1337

Comments

@TravisDev
Copy link
Contributor

New Issue Checklist

Issue Description

When using the method in the SDK Parse.Query.includeAll()... It will include all of the objects that are directly nested, but will not include nested objects in the nested objects.

Steps to reproduce

create a nested object Parent { child { grandchild {}}}... Query parent.get(id) includeAll(), you will not get all fields. remove the includeAll() and replafce it with include("child") and include("child.grandchild") and it will work as intended.

Actual Outcome

using includeAll, you can see basic data of the object, but no custom fields.

Expected Outcome

includeAll should include all of not just the child, but grandchild, greatgrandchild, etc...

Environment

Server
docker container parseplatform/parse-server:latest

Database
docker container mongo:latest

Client

  • Parse JS SDK version: 2.15.0
@dplewis
Copy link
Member

dplewis commented Apr 8, 2021

This is the expected behavior. This uses the _SCHEMA class to get the name of the nested / pointer fields. The _SCHEMA as no way of knowing what multiple layers are.

@TravisDev
Copy link
Contributor Author

@dplewis Gotcha. I was looking at it and was unsure. Is is practical to implement this usuing something other than _SCHEMA or in conjunction of something else to be able to find the multiple layers? I would be interested in contributing this if you believe it is feasible.

@dplewis
Copy link
Member

dplewis commented Apr 8, 2021

its doable but we would have to think about what all means. It could be n levels deep and we would have to check for recursion. It might be inefficient and costly query too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants