{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2131","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2131/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2131/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2131/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/2131","id":161945898,"number":2131,"title":"changing a field value in Users, not saving","user":{"login":"hash000000Beard","id":15691609,"avatar_url":"https://avatars.githubusercontent.com/u/15691609?v=3","gravatar_id":"","url":"https://api.github.com/users/hash000000Beard","html_url":"https://github.com/hash000000Beard","followers_url":"https://api.github.com/users/hash000000Beard/followers","following_url":"https://api.github.com/users/hash000000Beard/following{/other_user}","gists_url":"https://api.github.com/users/hash000000Beard/gists{/gist_id}","starred_url":"https://api.github.com/users/hash000000Beard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hash000000Beard/subscriptions","organizations_url":"https://api.github.com/users/hash000000Beard/orgs","repos_url":"https://api.github.com/users/hash000000Beard/repos","events_url":"https://api.github.com/users/hash000000Beard/events{/privacy}","received_events_url":"https://api.github.com/users/hash000000Beard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-23T15:04:01Z","updated_at":"2016-06-23T20:03:46Z","closed_at":"2016-06-23T20:03:46Z","body":"\r\n\r\n I am trying to change a field  called \"name\" for an already existing user.\r\nhowever, i cannot seem to get any response  from saving  the change as seen below.\r\n\r\n### Steps to reproduce\r\n\r\n> var query = new Parse.Query(Parse.User);\r\n>         query.equalTo(\"username\", \"someUserName\");\r\n> \r\n>           query.find({\r\n>               success: function(users){\r\n>                   console.log(\"user found\", users);\r\n>                    users.set(\"name\", \"new name\");\r\n>                    users.save(null,{\r\n>                     success: function(updated){\r\n>                 \r\n>                   },\r\n>                   error: function(error, updated){\r\n>                 \r\n>                    }\r\n>                  });\r\n> \r\n>        },\r\n>       error: function(error, users){\r\n>             console.error(\"error at querying: \", error);\r\n>        }\r\n>    }); \r\n\r\n#### Expected Results\r\n\r\ndid not work, so i looked it up an it appears i need to use the master key. i have tried to as in the mini snippet below\r\n\r\n>  users.save(null,{useMasterKey:true}{\r\n>             success: function(updated){\r\n>                //updated\r\n>                }\r\n\r\nHowever that did not work out as well. Im fairly new to parse server, and i would appreciate  any idea where i might have gone wrong\r\n\r\n### Environment Setup\r\n\r\n- **Server**\r\n  - parse-server version: 2.2.2\r\n "},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/228167060","html_url":"https://github.com/ParsePlatform/parse-server/issues/2131#issuecomment-228167060","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2131","id":228167060,"user":{"login":"hramos","id":165856,"avatar_url":"https://avatars.githubusercontent.com/u/165856?v=3","gravatar_id":"","url":"https://api.github.com/users/hramos","html_url":"https://github.com/hramos","followers_url":"https://api.github.com/users/hramos/followers","following_url":"https://api.github.com/users/hramos/following{/other_user}","gists_url":"https://api.github.com/users/hramos/gists{/gist_id}","starred_url":"https://api.github.com/users/hramos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hramos/subscriptions","organizations_url":"https://api.github.com/users/hramos/orgs","repos_url":"https://api.github.com/users/hramos/repos","events_url":"https://api.github.com/users/hramos/events{/privacy}","received_events_url":"https://api.github.com/users/hramos/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T20:03:46Z","updated_at":"2016-06-23T20:03:46Z","body":"A query returns an array of objects, but your code assumes \"users\" is a Parse object. Fixing that should take care of your issue.\r\n\r\nClosing this at it seems to be a general code-level question about using the Parse SDK. \r\n\r\nFor code-level and/or implementation-related questions or technical support, please refer to [Stack Overflow](http://stackoverflow.com/questions/tagged/parse.com)."}}
{"actor":{"display_login":"hramos"}}