{"action":"created","issue":{"url":"https://api.github.com/repos/js-data/js-data/issues/313","repository_url":"https://api.github.com/repos/js-data/js-data","labels_url":"https://api.github.com/repos/js-data/js-data/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/js-data/js-data/issues/313/comments","events_url":"https://api.github.com/repos/js-data/js-data/issues/313/events","html_url":"https://github.com/js-data/js-data/issues/313","id":140600064,"number":313,"title":"v3: build in function to return difference between current and previous data","user":{"login":"k2s","id":181014,"avatar_url":"https://avatars.githubusercontent.com/u/181014?v=3","gravatar_id":"","url":"https://api.github.com/users/k2s","html_url":"https://github.com/k2s","followers_url":"https://api.github.com/users/k2s/followers","following_url":"https://api.github.com/users/k2s/following{/other_user}","gists_url":"https://api.github.com/users/k2s/gists{/gist_id}","starred_url":"https://api.github.com/users/k2s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k2s/subscriptions","organizations_url":"https://api.github.com/users/k2s/orgs","repos_url":"https://api.github.com/users/k2s/repos","events_url":"https://api.github.com/users/k2s/events{/privacy}","received_events_url":"https://api.github.com/users/k2s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-14T07:47:43Z","updated_at":"2016-03-15T00:32:33Z","closed_at":null,"body":"To use `Record.hasChanged()` in v3 I have to implicitly enable change tracking.\r\nThe function Record.revert() works different, it loops over the values.\r\n\r\nCould there be function e.g. `Record.hasChangedPrevious()` which would evaluate change in data by looping over the values ?"},"comment":{"url":"https://api.github.com/repos/js-data/js-data/issues/comments/196585989","html_url":"https://github.com/js-data/js-data/issues/313#issuecomment-196585989","issue_url":"https://api.github.com/repos/js-data/js-data/issues/313","id":196585989,"user":{"login":"jmdobry","id":1213510,"avatar_url":"https://avatars.githubusercontent.com/u/1213510?v=3","gravatar_id":"","url":"https://api.github.com/users/jmdobry","html_url":"https://github.com/jmdobry","followers_url":"https://api.github.com/users/jmdobry/followers","following_url":"https://api.github.com/users/jmdobry/following{/other_user}","gists_url":"https://api.github.com/users/jmdobry/gists{/gist_id}","starred_url":"https://api.github.com/users/jmdobry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmdobry/subscriptions","organizations_url":"https://api.github.com/users/jmdobry/orgs","repos_url":"https://api.github.com/users/jmdobry/repos","events_url":"https://api.github.com/users/jmdobry/events{/privacy}","received_events_url":"https://api.github.com/users/jmdobry/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T00:32:32Z","updated_at":"2016-03-15T00:32:32Z","body":"Ah, haha! I didn't even think of that. I forgot that when `Record` is instantiated the values are saved and can be retrieved via `Record#previous()`. Yeah, `track: true` enabled real-time change detection and on-assignment validation, and `Record#changes()` returns statically saved changes. But diffing `Record` and `Record#previous()` can be a sort of passive change detection.\r\n\r\nI will think on this a little more and clean up the API a bit."}}