{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/251","repository_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/251/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/251/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-JS/issues/251","id":146169274,"number":251,"title":"Cannot get back the full object from the relational field after saving an object","user":{"login":"carmenlau","id":388892,"avatar_url":"https://avatars.githubusercontent.com/u/388892?v=3","gravatar_id":"","url":"https://api.github.com/users/carmenlau","html_url":"https://github.com/carmenlau","followers_url":"https://api.github.com/users/carmenlau/followers","following_url":"https://api.github.com/users/carmenlau/following{/other_user}","gists_url":"https://api.github.com/users/carmenlau/gists{/gist_id}","starred_url":"https://api.github.com/users/carmenlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmenlau/subscriptions","organizations_url":"https://api.github.com/users/carmenlau/orgs","repos_url":"https://api.github.com/users/carmenlau/repos","events_url":"https://api.github.com/users/carmenlau/events{/privacy}","received_events_url":"https://api.github.com/users/carmenlau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-06T02:39:45Z","updated_at":"2016-04-06T18:28:26Z","closed_at":null,"body":"We set a complete object to object's relation field, but there is only id leave after saving. Following is the testing code and the output comparison between parse.com and parse-server.\r\n\r\n**The testing cloud code:**\r\n```\r\nParse.Cloud.define(\"testQuery\", function(request, response) {\r\n  var objectQuery = new Parse.Query(ObjectClass);\r\n  var Object;\r\n\r\n  objectQuery.include('user');\r\n  objectQuery\r\n  .get(\"_<object_id>_\", {useMasterKey: true})\r\n  .then(function(_object) {\r\n    object = _object;\r\n    object.set('user', request.user);\r\n    console.log(\"1 ======> \" + JSON.stringify(object.get(\"user\")));\r\n    console.log(\"1 ======> \" + object.get(\"user\").getUsername());\r\n    return object.save(null, {useMasterKey: true});\r\n  })\r\n  .then(function() {\r\n    console.log(\"2 ======> \" + JSON.stringify(object.get(\"user\")));\r\n    console.log(\"2 ======> \" + object.get(\"user\").getUsername());\r\n    response.success(\"\");\r\n  }, function(error) {\r\n    response.error(error);\r\n  });\r\n});\r\n```\r\n\r\n**console log of parse.com:**\r\n1 ======> {**< full user object >**}\r\n1 ======> username\r\n2 ======> {**< full user object >**}\r\n2 ======> username\r\n\r\n**console log of parse.com:**\r\n1 ======> {**< full user object >**}\r\n1 ======> username\r\n2 ======> {\"objectId\":\"**< user id >**\"}\r\n2 ======> undefined\r\n"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/comments/206504565","html_url":"https://github.com/ParsePlatform/Parse-SDK-JS/issues/251#issuecomment-206504565","issue_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/251","id":206504565,"user":{"login":"andrewimm","id":494043,"avatar_url":"https://avatars.githubusercontent.com/u/494043?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewimm","html_url":"https://github.com/andrewimm","followers_url":"https://api.github.com/users/andrewimm/followers","following_url":"https://api.github.com/users/andrewimm/following{/other_user}","gists_url":"https://api.github.com/users/andrewimm/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewimm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewimm/subscriptions","organizations_url":"https://api.github.com/users/andrewimm/orgs","repos_url":"https://api.github.com/users/andrewimm/repos","events_url":"https://api.github.com/users/andrewimm/events{/privacy}","received_events_url":"https://api.github.com/users/andrewimm/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T18:28:26Z","updated_at":"2016-04-06T18:28:26Z","body":"Which of the two outputs is cloud code, and which is from parse-server. You wrote parse.com twice :)"}}