We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Queries that contain a $select query on pointer fields always return empty result - unable to handle inner $select query.
Setup There is a user, a quiz belonging to the user and some game records of that quiz: User:
curl -X GET \ -H "X-Parse-Application-Id: appid" \ -H "X-Parse-REST-API-Key: restkey" \ 128.00.00.00:1337/classes/_User/ggz9FqKTFI
{"objectId":"ggz9FqKTFI","username":"Test", "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}
Quiz - owner points to above user:
curl -X GET \ -H "X-Parse-Application-Id: appid" \ -H "X-Parse-REST-API-Key: restkey" \ --data-urlencode 'include=owner' \ 128.00.00.00:1337/classes/Quiz/GSdG0hSNgN
{"objectId":"GSdG0hSNgN","name":"testQuiz", "owner":{"objectId":"ggz9FqKTFI","username":"Test", "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z", "__type":"Object","className":"_User"} "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}
Game record - of above quiz:
curl -X GET \ -H "X-Parse-Application-Id: appid" \ -H "X-Parse-REST-API-Key: restkey" \ --data-urlencode 'include=quiz' \ 128.00.00.00:1337/classes/Game/gVKtQt2lDE
{"objectId":"gVKtQt2lDE","score":95, "quiz":{"objectId":"GSdG0hSNgN","name":"testQuiz", "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z", "__type":"Object","className":"Quiz"} "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}
Problem Below query is to retrieve play records of quizzes belonging to a certain user,
curl -X GET \ -H "X-Parse-Application-Id: appid" \ -H "X-Parse-REST-API-Key: restkey" \ -G --data-urlencode \ 'where={"quizling":{"$select": {"query":{"className":"Quiz", "where":{"owner {"__type":"Pointer","className":"_User","objectId":"ggz9FqKTFI"}}}, "key":"objectId"}}}' \ 128.00.00.00:1337/classes/Game/
The inner query $select gets the object ids of all quizzes of a user and then out query grabs all game records points to any of the ids.
The parse sever returns:
{"results":[]}
The same query returns expected result on parse.com:
{"results": [{"objectId":"gVKtQt2lDE","score":95, "quiz":{"objectId":"GSdG0hSNgN", "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z", "__type":"Object","className":"Quiz"} "createdAt":"2016-09-26T17:00:56.365Z","updatedAt":"2016-09-26T17:00:56.365Z"}]}
Same query works fine on parse.com, all queries like this with $select on a pointer field will return empty on parse-server.
I think it is supposed to be supported in #2737 , if not please consider it for future release, thanks.
The text was updated successfully, but these errors were encountered:
I believe this issue has been fixed since, can you update to latest version and reopen if necessary?
Sorry, something went wrong.
No branches or pull requests
Issue Description
Queries that contain a $select query on pointer fields always return empty result - unable to handle inner $select query.
Steps to reproduce
Setup
There is a user, a quiz belonging to the user and some game records of that quiz:
User:
Quiz - owner points to above user:
Game record - of above quiz:
Problem
Below query is to retrieve play records of quizzes belonging to a certain user,
The inner query $select gets the object ids of all quizzes of a user and then out query grabs all game records points to any of the ids.
The parse sever returns:
{"results":[]}
The same query returns expected result on parse.com:
Same query works fine on parse.com, all queries like this with $select on a pointer field will return empty on parse-server.
I think it is supposed to be supported in #2737 , if not please consider it for future release, thanks.
Environment Setup
The text was updated successfully, but these errors were encountered: