{"action":"created","comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments/58966425","id":58966425,"diff_hunk":"@@ -646,84 +645,50 @@ function untransformObject(schema, className, mongoObject, isNestedObject = fals\n \n     var restObject = untransformACL(mongoObject);\n     for (var key in mongoObject) {\n-      // TODO: This could use some cleanup. Default case handling still needs to happen for some nested keys.\n+      const specialKeys = [\n+        '_id',\n+        '_hashed_password',\n+        '_acl',\n+        '_email_verify_token',\n+        '_perishable_token',\n+        '_tombstone',\n+        '_session_token',\n+        'updatedAt',\n+        '_updated_at',\n+        'createdAt',\n+        '_created_at',\n+        'expiresAt',\n+        '_expiresAt',\n+      ];\n+      if (_.includes(specialKeys, key) && isNestedObject) {","path":"src/transform.js","position":47,"original_position":35,"commit_id":"9aa47a8181f0508c35ec98f2b63988c109f4f6b5","original_commit_id":"9aa47a8181f0508c35ec98f2b63988c109f4f6b5","user":{"login":"blacha","id":1082761,"avatar_url":"https://avatars.githubusercontent.com/u/1082761?v=3","gravatar_id":"","url":"https://api.github.com/users/blacha","html_url":"https://github.com/blacha","followers_url":"https://api.github.com/users/blacha/followers","following_url":"https://api.github.com/users/blacha/following{/other_user}","gists_url":"https://api.github.com/users/blacha/gists{/gist_id}","starred_url":"https://api.github.com/users/blacha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blacha/subscriptions","organizations_url":"https://api.github.com/users/blacha/orgs","repos_url":"https://api.github.com/users/blacha/repos","events_url":"https://api.github.com/users/blacha/events{/privacy}","received_events_url":"https://api.github.com/users/blacha/received_events","type":"User","site_admin":false},"body":"should switch these two statements around so the if will exit early with the boolean compare rather than a Object key iteration\r\n\r\n```javascript\r\nif(isNestedObject && _.includes(specialKeys, key)) {\r\n...\r\n}\r\n``","created_at":"2016-04-08T00:29:09Z","updated_at":"2016-04-08T00:29:09Z","html_url":"https://github.com/ParsePlatform/parse-server/pull/1420#discussion_r58966425","pull_request_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420","_links":{"self":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments/58966425"},"html":{"href":"https://github.com/ParsePlatform/parse-server/pull/1420#discussion_r58966425"},"pull_request":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420"}}},"pull_request":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420","id":65715225,"html_url":"https://github.com/ParsePlatform/parse-server/pull/1420","diff_url":"https://github.com/ParsePlatform/parse-server/pull/1420.diff","patch_url":"https://github.com/ParsePlatform/parse-server/pull/1420.patch","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1420","number":1420,"state":"open","locked":false,"title":"Fixes #1417","user":{"login":"drew-gross","id":558242,"avatar_url":"https://avatars.githubusercontent.com/u/558242?v=3","gravatar_id":"","url":"https://api.github.com/users/drew-gross","html_url":"https://github.com/drew-gross","followers_url":"https://api.github.com/users/drew-gross/followers","following_url":"https://api.github.com/users/drew-gross/following{/other_user}","gists_url":"https://api.github.com/users/drew-gross/gists{/gist_id}","starred_url":"https://api.github.com/users/drew-gross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drew-gross/subscriptions","organizations_url":"https://api.github.com/users/drew-gross/orgs","repos_url":"https://api.github.com/users/drew-gross/repos","events_url":"https://api.github.com/users/drew-gross/events{/privacy}","received_events_url":"https://api.github.com/users/drew-gross/received_events","type":"User","site_admin":false},"body":"Pretty ugly solution but it does the trick.","created_at":"2016-04-07T23:18:24Z","updated_at":"2016-04-08T00:29:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd2cf527bf64cb84aece453a6ceef6554642b25d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420/commits","review_comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420/comments","review_comment_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1420/comments","statuses_url":"https://api.github.com/repos/ParsePlatform/parse-server/statuses/9aa47a8181f0508c35ec98f2b63988c109f4f6b5","head":{"label":"drew-gross:fix-nested-special-keys","ref":"fix-nested-special-keys","sha":"9aa47a8181f0508c35ec98f2b63988c109f4f6b5","user":{"login":"drew-gross","id":558242,"avatar_url":"https://avatars.githubusercontent.com/u/558242?v=3","gravatar_id":"","url":"https://api.github.com/users/drew-gross","html_url":"https://github.com/drew-gross","followers_url":"https://api.github.com/users/drew-gross/followers","following_url":"https://api.github.com/users/drew-gross/following{/other_user}","gists_url":"https://api.github.com/users/drew-gross/gists{/gist_id}","starred_url":"https://api.github.com/users/drew-gross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drew-gross/subscriptions","organizations_url":"https://api.github.com/users/drew-gross/orgs","repos_url":"https://api.github.com/users/drew-gross/repos","events_url":"https://api.github.com/users/drew-gross/events{/privacy}","received_events_url":"https://api.github.com/users/drew-gross/received_events","type":"User","site_admin":false},"repo":{"id":51231720,"name":"parse-server","full_name":"drew-gross/parse-server","owner":{"login":"drew-gross","id":558242,"avatar_url":"https://avatars.githubusercontent.com/u/558242?v=3","gravatar_id":"","url":"https://api.github.com/users/drew-gross","html_url":"https://github.com/drew-gross","followers_url":"https://api.github.com/users/drew-gross/followers","following_url":"https://api.github.com/users/drew-gross/following{/other_user}","gists_url":"https://api.github.com/users/drew-gross/gists{/gist_id}","starred_url":"https://api.github.com/users/drew-gross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drew-gross/subscriptions","organizations_url":"https://api.github.com/users/drew-gross/orgs","repos_url":"https://api.github.com/users/drew-gross/repos","events_url":"https://api.github.com/users/drew-gross/events{/privacy}","received_events_url":"https://api.github.com/users/drew-gross/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drew-gross/parse-server","description":"Parse-compatible API server module for Node/Express","fork":true,"url":"https://api.github.com/repos/drew-gross/parse-server","forks_url":"https://api.github.com/repos/drew-gross/parse-server/forks","keys_url":"https://api.github.com/repos/drew-gross/parse-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drew-gross/parse-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drew-gross/parse-server/teams","hooks_url":"https://api.github.com/repos/drew-gross/parse-server/hooks","issue_events_url":"https://api.github.com/repos/drew-gross/parse-server/issues/events{/number}","events_url":"https://api.github.com/repos/drew-gross/parse-server/events","assignees_url":"https://api.github.com/repos/drew-gross/parse-server/assignees{/user}","branches_url":"https://api.github.com/repos/drew-gross/parse-server/branches{/branch}","tags_url":"https://api.github.com/repos/drew-gross/parse-server/tags","blobs_url":"https://api.github.com/repos/drew-gross/parse-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drew-gross/parse-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drew-gross/parse-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/drew-gross/parse-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drew-gross/parse-server/statuses/{sha}","languages_url":"https://api.github.com/repos/drew-gross/parse-server/languages","stargazers_url":"https://api.github.com/repos/drew-gross/parse-server/stargazers","contributors_url":"https://api.github.com/repos/drew-gross/parse-server/contributors","subscribers_url":"https://api.github.com/repos/drew-gross/parse-server/subscribers","subscription_url":"https://api.github.com/repos/drew-gross/parse-server/subscription","commits_url":"https://api.github.com/repos/drew-gross/parse-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/drew-gross/parse-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/drew-gross/parse-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/drew-gross/parse-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/drew-gross/parse-server/contents/{+path}","compare_url":"https://api.github.com/repos/drew-gross/parse-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drew-gross/parse-server/merges","archive_url":"https://api.github.com/repos/drew-gross/parse-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drew-gross/parse-server/downloads","issues_url":"https://api.github.com/repos/drew-gross/parse-server/issues{/number}","pulls_url":"https://api.github.com/repos/drew-gross/parse-server/pulls{/number}","milestones_url":"https://api.github.com/repos/drew-gross/parse-server/milestones{/number}","notifications_url":"https://api.github.com/repos/drew-gross/parse-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drew-gross/parse-server/labels{/name}","releases_url":"https://api.github.com/repos/drew-gross/parse-server/releases{/id}","deployments_url":"https://api.github.com/repos/drew-gross/parse-server/deployments","created_at":"2016-02-07T01:58:26Z","updated_at":"2016-02-07T01:58:27Z","pushed_at":"2016-04-08T00:24:53Z","git_url":"git://github.com/drew-gross/parse-server.git","ssh_url":"git@github.com:drew-gross/parse-server.git","clone_url":"https://github.com/drew-gross/parse-server.git","svn_url":"https://github.com/drew-gross/parse-server","homepage":null,"size":1505,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ParsePlatform:master","ref":"master","sha":"bc96f0beb1d17d8d4a5a7c543f378e71ca5248ca","user":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":50603846,"name":"parse-server","full_name":"ParsePlatform/parse-server","owner":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ParsePlatform/parse-server","description":"Parse-compatible API server module for Node/Express","fork":false,"url":"https://api.github.com/repos/ParsePlatform/parse-server","forks_url":"https://api.github.com/repos/ParsePlatform/parse-server/forks","keys_url":"https://api.github.com/repos/ParsePlatform/parse-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ParsePlatform/parse-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ParsePlatform/parse-server/teams","hooks_url":"https://api.github.com/repos/ParsePlatform/parse-server/hooks","issue_events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/events{/number}","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/events","assignees_url":"https://api.github.com/repos/ParsePlatform/parse-server/assignees{/user}","branches_url":"https://api.github.com/repos/ParsePlatform/parse-server/branches{/branch}","tags_url":"https://api.github.com/repos/ParsePlatform/parse-server/tags","blobs_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ParsePlatform/parse-server/statuses/{sha}","languages_url":"https://api.github.com/repos/ParsePlatform/parse-server/languages","stargazers_url":"https://api.github.com/repos/ParsePlatform/parse-server/stargazers","contributors_url":"https://api.github.com/repos/ParsePlatform/parse-server/contributors","subscribers_url":"https://api.github.com/repos/ParsePlatform/parse-server/subscribers","subscription_url":"https://api.github.com/repos/ParsePlatform/parse-server/subscription","commits_url":"https://api.github.com/repos/ParsePlatform/parse-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/ParsePlatform/parse-server/contents/{+path}","compare_url":"https://api.github.com/repos/ParsePlatform/parse-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ParsePlatform/parse-server/merges","archive_url":"https://api.github.com/repos/ParsePlatform/parse-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ParsePlatform/parse-server/downloads","issues_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues{/number}","pulls_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls{/number}","milestones_url":"https://api.github.com/repos/ParsePlatform/parse-server/milestones{/number}","notifications_url":"https://api.github.com/repos/ParsePlatform/parse-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/labels{/name}","releases_url":"https://api.github.com/repos/ParsePlatform/parse-server/releases{/id}","deployments_url":"https://api.github.com/repos/ParsePlatform/parse-server/deployments","created_at":"2016-01-28T18:29:14Z","updated_at":"2016-04-07T23:30:15Z","pushed_at":"2016-04-08T00:24:54Z","git_url":"git://github.com/ParsePlatform/parse-server.git","ssh_url":"git@github.com:ParsePlatform/parse-server.git","clone_url":"https://github.com/ParsePlatform/parse-server.git","svn_url":"https://github.com/ParsePlatform/parse-server","homepage":null,"size":3022,"stargazers_count":8010,"watchers_count":8010,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1921,"mirror_url":null,"open_issues_count":46,"forks":1921,"open_issues":46,"watchers":8010,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420"},"html":{"href":"https://github.com/ParsePlatform/parse-server/pull/1420"},"issue":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1420"},"comments":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1420/comments"},"review_comments":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420/comments"},"review_comment":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/1420/commits"},"statuses":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/statuses/9aa47a8181f0508c35ec98f2b63988c109f4f6b5"}}}}