-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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} not working on specific object request #1124
Comments
confirm |
2.2.1 - bug exists |
This is an issue for me as well -- 2.2.0 Edit: Confirming for 2.2.2 |
confirm |
1 similar comment
confirm |
Temp FixThis is working for me at the moment, at least until the parse team provides an update. Hopefully this helps some of you as well. EDIT (2016-03-30 1:42PM EST): Fixed EDIT (2016-04-01 12:08 EST): Submitted a pull request that should fix this. If you go into the code and look inside of
If you look at the method above it on line 42 (
|
No need to wait for the Parse team, you can open a pull request :) Make sure to also include tests in your PR. |
I believe this has been merged with #1280. Please reopen if it wasn't |
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
Steps to reproduce
1 - Insert a class
curl -X POST -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" -H "X-Parse-Master-Key: XXXX" -d '{
"platform" : "Android",
"isMerged" : "true"
}' "http://localhost:1337/parse/classes/AppConfig"
ObjectId: uq9RVGSIrv
2 - Insert another class
curl -X POST -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" -H "X-Parse-Master-Key: XXXX" -d '{
"name" : "John Smith",
"streetAddress" : "123 Main St"
}' "http://localhost:1337/parse/classes/Player"
ObjectId: UoBKuO29mp
3 - Insert a few types of relations between the 2 classes, since I'm not sure what the correct syntax is
curl -X PUT -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" -H "X-Parse-Master-Key: XXXX" -d '{"player":{"__op":"AddUnique","objects":[{"__type":"Pointer","className":"Player","objectId":"UoBKuO29mp"}]}}
' "http://localhost:1337/parse/classes/AppConfig/uq9RVGSIrv"
curl -X PUT -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" -H "X-Parse-Master-Key: XXXX" -d '{"player2":{"__op":"AddRelation","objects":[{"__type":"Pointer","className":"Player","objectId":"UoBKuO29mp"}]}}
' "http://localhost:1337/parse/classes/AppConfig/uq9RVGSIrv"
curl -X PUT -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" -d '{"player3":{"__op":"Add","objects":[{"__type":"Pointer","className":"Player","objectId":"UoBKuO29mp"}]}}
' "http://localhost:1337/parse/classes/AppConfig/uq9RVGSIrv"
curl -X POST -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" -d '{"Level" : "TWO", "player4":{"__op":"AddUnique","objects":[{"__type":"Pointer","className":"Player","objectId":"UoBKuO29mp"}]}}
' "http://localhost:1337/parse/classes/AppConfig"
4 - Get the AppConfig object and notice the "include=" does not work
curl -X GET -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" "http://localhost:1337/parse/classes/AppConfig/uq9RVGSIrv?include=player"
Results:
5 - Get rid of the objectId in the query and it works as expected
curl -X GET -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" "http://localhost:1337/parse/classes/AppConfig?include=player"
OR
curl -X GET -H "X-Parse-Application-Id: XXXX" -H "Content-Type: application/json" "http://localhost:1337/parse/classes/AppConfig?include=player&include=player4&include=player3"
I think this is not the expected behavior.
Thanks!
Logs/Trace
The text was updated successfully, but these errors were encountered: