{"action":"created","issue":{"url":"https://api.github.com/repos/parse-community/parse-server/issues/4742","repository_url":"https://api.github.com/repos/parse-community/parse-server","labels_url":"https://api.github.com/repos/parse-community/parse-server/issues/4742/labels{/name}","comments_url":"https://api.github.com/repos/parse-community/parse-server/issues/4742/comments","events_url":"https://api.github.com/repos/parse-community/parse-server/issues/4742/events","html_url":"https://github.com/parse-community/parse-server/issues/4742","id":318781542,"number":4742,"title":"query[key].$in.map is not a function","user":{"login":"francocorreasosa","id":4152942,"avatar_url":"https://avatars0.githubusercontent.com/u/4152942?v=4","gravatar_id":"","url":"https://api.github.com/users/francocorreasosa","html_url":"https://github.com/francocorreasosa","followers_url":"https://api.github.com/users/francocorreasosa/followers","following_url":"https://api.github.com/users/francocorreasosa/following{/other_user}","gists_url":"https://api.github.com/users/francocorreasosa/gists{/gist_id}","starred_url":"https://api.github.com/users/francocorreasosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francocorreasosa/subscriptions","organizations_url":"https://api.github.com/users/francocorreasosa/orgs","repos_url":"https://api.github.com/users/francocorreasosa/repos","events_url":"https://api.github.com/users/francocorreasosa/events{/privacy}","received_events_url":"https://api.github.com/users/francocorreasosa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-30T04:09:16Z","updated_at":"2018-04-30T19:57:03Z","closed_at":"2018-04-30T19:57:03Z","author_association":"NONE","body":"### Issue Description / Steps to reproduce\r\n\r\nQuery the following from the JS SDK:\r\n```js\r\nexport function allUserGroups() {\r\n  const Group = Parse.Object.extend('Group');\r\n  const query = new Parse.Query(Group);\r\n  query.containedIn('users', Parse.User.current());\r\n\r\n  return query;\r\n}\r\n```\r\n\r\nWhere **Group** has a `users` key that represents a `Relation<User>`\r\n\r\n#### Expected Results\r\nUsers in the group.\r\n\r\n#### Actual Outcome\r\n500 Server Error.\r\n\r\n### Environment Setup\r\n\r\n- **Server**\r\n  - parse-server version (Be specific! Don't say 'latest'.) : 2.7.4\r\n  - Operating System:    macOS High Sierra 10.13.3 (17D47)\r\n  - Hardware:  MacBook Pro (Retina, 15-inch, Mid 2015)\r\n  - Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): localhost\r\n\r\n- **Database**\r\n  - MongoDB version: v3.4.4-build1\r\n  - Storage engine:  Default / Not relevant\r\n  - Hardware:  MacBook Pro (Retina, 15-inch, Mid 2015)\r\n  - Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): localhost\r\n\r\n### Logs/Trace\r\n\r\n#### HTTP Request\r\n```\r\nverbose: REQUEST for [GET] /api/classes/Group: {\r\n  \"where\": {\r\n    \"users\": {\r\n      \"$in\": {\r\n        \"__type\": \"Pointer\",\r\n        \"className\": \"_User\",\r\n        \"objectId\": \"Ua6YoYelyK\"\r\n      }\r\n    }\r\n  }\r\n} method=GET, url=/api/classes/Group, host=localhost:3000, connection=keep-alive, content-length=288, origin=http://localhost:3001, user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36, content-type=text/plain, accept=*/*, referer=http://localhost:3001/, accept-encoding=gzip, deflate, br, accept-language=en-US,en;q=0.9,es-419;q=0.8,es;q=0.7, __type=Pointer, className=_User, objectId=Ua6YoYelyK\r\nerror: Error generating response. TypeError: query[key].$in.map is not a function\r\n    at Object.keys.map.constraintKey (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:697:44)\r\n    at Array.map (<anonymous>)\r\n    at Object.keys.map.key (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:691:43)\r\n    at Array.map (<anonymous>)\r\n    at DatabaseController.reduceInRelation (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:683:41)\r\n    at then.then (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:885:194)\r\n    at <anonymous>\r\n    at process._tickDomainCallback (internal/process/next_tick.js:228:7)\r\nerror: Uncaught internal server error. TypeError: query[key].$in.map is not a function\r\n    at Object.keys.map.constraintKey (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:697:44)\r\n    at Array.map (<anonymous>)\r\n    at Object.keys.map.key (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:691:43)\r\n    at Array.map (<anonymous>)\r\n    at DatabaseController.reduceInRelation (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:683:41)\r\n    at then.then (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:885:194)\r\n    at <anonymous>\r\n    at process._tickDomainCallback (internal/process/next_tick.js:228:7) TypeError: query[key].$in.map is not a function\r\n    at Object.keys.map.constraintKey (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:697:44)\r\n    at Array.map (<anonymous>)\r\n    at Object.keys.map.key (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:691:43)\r\n    at Array.map (<anonymous>)\r\n    at DatabaseController.reduceInRelation (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:683:41)\r\n    at then.then (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:885:194)\r\n    at <anonymous>\r\n    at process._tickDomainCallback (internal/process/next_tick.js:228:7)\r\nTypeError: query[key].$in.map is not a function\r\n    at Object.keys.map.constraintKey (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:697:44)\r\n    at Array.map (<anonymous>)\r\n    at Object.keys.map.key (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:691:43)\r\n    at Array.map (<anonymous>)\r\n    at DatabaseController.reduceInRelation (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:683:41)\r\n    at then.then (/Users/franco/Code/parse-server-talk/server/node_modules/parse-server/lib/Controllers/DatabaseController.js:885:194)\r\n    at <anonymous>\r\n    at process._tickDomainCallback (internal/process/next_tick.js:228:7)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/parse-community/parse-server/issues/comments/385510559","html_url":"https://github.com/parse-community/parse-server/issues/4742#issuecomment-385510559","issue_url":"https://api.github.com/repos/parse-community/parse-server/issues/4742","id":385510559,"user":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars3.githubusercontent.com/u/364568?v=4","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"created_at":"2018-04-30T19:57:03Z","updated_at":"2018-04-30T19:57:03Z","author_association":"OWNER","body":"You can probably just use `equalTo` if the `users` is an array. If it's a query that should also work. THis looks like exactly what is described in the docs: http://docs.parseplatform.org/js/guide/#using-parse-relations"}}
{"actor":{"display_login":"flovilmart"}}