{"action":"opened","issue":{"url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/13","labels_url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/13/comments","events_url":"https://api.github.com/repos/Wakanda/wakanda-issues/issues/13/events","html_url":"https://github.com/Wakanda/wakanda-issues/issues/13","id":94256368,"number":13,"title":"$fetch does not update __STAMP","user":{"login":"yboukhata","id":8216149,"avatar_url":"https://avatars.githubusercontent.com/u/8216149?v=3","gravatar_id":"","url":"https://api.github.com/users/yboukhata","html_url":"https://github.com/yboukhata","followers_url":"https://api.github.com/users/yboukhata/followers","following_url":"https://api.github.com/users/yboukhata/following{/other_user}","gists_url":"https://api.github.com/users/yboukhata/gists{/gist_id}","starred_url":"https://api.github.com/users/yboukhata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yboukhata/subscriptions","organizations_url":"https://api.github.com/users/yboukhata/orgs","repos_url":"https://api.github.com/users/yboukhata/repos","events_url":"https://api.github.com/users/yboukhata/events{/privacy}","received_events_url":"https://api.github.com/users/yboukhata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-10T09:04:43Z","updated_at":"2015-07-10T09:04:43Z","closed_at":null,"body":"<a href=\"https://github.com/paulsouche\"><img src=\"https://avatars.githubusercontent.com/u/5860504?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [paulsouche](https://github.com/paulsouche)**\n_Monday Jun 08, 2015 at 14:01 GMT_\n_Originally opened as https://github.com/Wakanda/angular-wakanda/issues/13_\n\n----\n\nI have an issue with the following code\r\n\r\n```javascript\r\nentity.$save()\r\n        .then(function() {\r\n          entity.callForAnEntityMethod(data);\r\n        })\r\n        .then(function() {\r\n          //The stamp is not synchronised anymore because of a save on backend during the call\r\n        });\r\n```\r\n\r\n\"callForAnEntityMethod\" code\r\n```javascript\r\nmodel.myClass.entityMethods = {\r\n       callForAnEntityMethod: function(data) {\r\n             //do something with the data\r\n             this.save();\r\n       }\r\n}\r\n```\r\n\r\nSo I tried with a $fetch to resynchronise the STAMP. Request is OK and the __STAMP is the good one in the http response but the entity is not updated ?\r\n\r\n```javascript\r\n//STAMP 1\r\nentity.$save()\r\n        .then(function() {\r\n          //STAMP 1\r\n          entity.callForAnEntityMethod(data);\r\n        })\r\n        .then(function() {\r\n          //STAMP 1 (and 2 on the server)\r\n          return entity.$fetch();\r\n        })\r\n        .then(function(result) {\r\n              result.__STAMP //1\r\n              entity.__STAMP //1\r\n              //But STAMP 2 in the http response :-(\r\n        })\r\n```\r\n\r\nThis works with a $save\r\nThank you\n"}}