Skip to content

Include={field.2ndLevel} of array of pointers which point to not existing objects returns error. #1302

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
3 tasks done
dtsymbal opened this issue Mar 31, 2016 · 1 comment · Fixed by #1314
Closed
3 tasks done
Labels
type:question Support or code-level question

Comments

@dtsymbal
Copy link

Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Parse-server running locally: v.2.2.4

Steps to reproduce

  • create class Color

curl -X POST "$apiUrl/schemas/Color" -H "X-Parse-Application-Id: $applicationId" -H "X-Parse-Master-Key: $masterKey" -H "Content-Type: application/json" -d '{"className": "Color", "fields": {"hex": {"type": "String"}}}'

  • create class Circle

curl -X POST "$apiUrl/schemas/Circle" -H "X-Parse-Application-Id: $applicationId" -H "X-Parse-Master-Key: $masterKey" -H "Content-Type: application/json" -d '{"className": "Circle", "fields": {"radius": {"type": "Number"}, "color": {"type": "Pointer", "targetClass": "Color"}}}'

  • create class ComplexFigure and object with invalid pointer

curl -X POST "$apiUrl/schemas/ComplexFigure" -H "X-Parse-Application-Id: $applicationId" -H "X-Parse-Master-Key: $masterKey" -H "Content-Type: application/json" -d '{"className": "ComplexFigure", "fields": {"consistsOf": {"type": "Array"}}}'
curl -X POST "$apiUrl/classes/ComplexFigure" -H "X-Parse-Application-Id: $applicationId" -H "Content-Type: application/json" -d '{"consistsOf": [{"__type": "Pointer", "className": "Circle", "objectId": "notExistingId"}]}'

  • query

curl -X GET "$apiUrl/classes/ComplexFigure" -H "X-Parse-Application-Id: $applicationId" -H "Content-Type: application/json" -G --data-urlencode "include=consistsOf.color"

{"code":102,"error":"can only include pointer fields"}

Logs/Trace

{"code":102,"error":"can only include pointer fields"}

@dtsymbal
Copy link
Author

maybe it somehow connected with #1293

flovilmart added a commit that referenced this issue Apr 1, 2016
flovilmart added a commit that referenced this issue Apr 1, 2016
- when including elements from an array of pointers, filters unaccessible/missing objects
@mtrezza mtrezza added type:question Support or code-level question and removed 🔧 troubleshooting labels Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants