Description
Issue Description
Queries that include a pointer and select that pointer do not retrieve the pointer attributes.
Steps to reproduce
Setup:
curl -X POST \
-H "X-Parse-Application-Id: appId" \
-H "X-Parse-REST-API-Key: restAPIKey" \
-H "Content-Type: application/json" \
-d '{"score":1337}' \
http://localhost:1337/parse/classes/GameScore
curl -X POST \
-H "X-Parse-Application-Id: appId" \
-H "X-Parse-REST-API-Key: restAPIKey" \
-H "Content-Type: application/json" \
-d '{"gameScore": { "__type": "Pointer", "className": "GameScore", "objectId": "GSdG0hSNgN"}, "other":"thing"}' \
http://localhost:1337/parse/classes/Player
Verify data created correctly, including the pointer:
curl -X GET \
-H "X-Parse-Application-Id: appId" \
-H "X-Parse-REST-API-Key: restAPIKey" \
--data-urlencode 'include=gameScore' \
http://localhost:1337/parse/classes/Player/gVKtQt2lDE
{"objectId":"gVKtQt2lDE","gameScore":{"objectId":"GSdG0hSNgN","score":1337,"createdAt":"2016-09-26T16:37:14.107Z","updatedAt":"2016-09-26T16:37:14.107Z","__type":"Object","className":"GameScore"},"other":"thing","createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}
Now also select the pointer (should omit other
and include only gameScore
), but properties of gameScore are also omitted:
curl -X GET \
-H "X-Parse-Application-Id: appId" \
-H "X-Parse-REST-API-Key: restAPIKey" \
--data-urlencode 'include=gameScore' \
--data-urlencode 'keys=gameScore' \
http://localhost:1337/parse/classes/Player/gVKtQt2lDE
{"objectId":"gVKtQt2lDE","gameScore":{"objectId":"GSdG0hSNgN","createdAt":"2016-09-26T16:37:14.107Z","updatedAt":"2016-09-26T16:37:14.107Z","__type":"Object","className":"GameScore"},"createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}
Expected:
{"objectId":"gVKtQt2lDE","gameScore":{"objectId":"GSdG0hSNgN","score":1337,"createdAt":"2016-09-26T16:37:14.107Z","updatedAt":"2016-09-26T16:37:14.107Z","__type":"Object","className":"GameScore"},"createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}
This may have been broken in #2737
Environment Setup
- Server
- parse-server version (Be specific! Don't say 'latest'.) : 2.2.22
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost