Skip to content
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

Include={field} of array of pointers with different class names returns error. #1298

Closed
3 tasks done
dtsymbal opened this issue Mar 31, 2016 · 2 comments · Fixed by #1312
Closed
3 tasks done

Include={field} of array of pointers with different class names returns error. #1298

dtsymbal opened this issue Mar 31, 2016 · 2 comments · Fixed by #1312

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

applicationId=XXXXX
masterKey=YYYYY
apiUrl="http://localhost:1337/parse"

  • create 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"}}}'
curl -X POST "$apiUrl/classes/Circle" -H "X-Parse-Application-Id: $applicationId" -H "Content-Type: application/json" -d '{"radius": 10}'

returns objectId: oMJAhjFRBt

  • create Rectangle

curl -X POST "$apiUrl/schemas/Rectangle" -H "X-Parse-Application-Id: $applicationId" -H "X-Parse-Master-Key: $masterKey" -H "Content-Type: application/json" -d '{"className": "Rectangle", "fields": {"side1": {"type": "Number"}, "side2": {"type": "Number"}}}'
curl -X POST "$apiUrl/classes/Rectangle" -H "X-Parse-Application-Id: $applicationId" -H "Content-Type: application/json" -d '{"side1": 10, "side2": 20}'

returns objectId: kx4NoFUPLl

  • create ComplexFigure

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": "oMJAhjFRBt"}, {"__type": "Pointer", "className": "Rectangle", "objectId": "kx4NoFUPLl"}]}'

  • query

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

returns {"code":107,"error":"inconsistent type data for include"}

Logs/Trace

@flovilmart
Copy link
Contributor

Was that functional on parse.com? I'm not sure @gfosco, @drew-gross ?

@flovilmart
Copy link
Contributor

scratch that I managed to repro on parse.com the functional version of it and working on a fix now

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