{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/493","labels_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/493/comments","events_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/493/events","html_url":"https://github.com/Azure/azure-mobile-services/issues/493","id":48813891,"number":493,"title":"Cancel pending operations","user":{"login":"jcmm33","id":1143163,"avatar_url":"https://avatars.githubusercontent.com/u/1143163?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmm33","html_url":"https://github.com/jcmm33","followers_url":"https://api.github.com/users/jcmm33/followers","following_url":"https://api.github.com/users/jcmm33/following{/other_user}","gists_url":"https://api.github.com/users/jcmm33/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmm33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmm33/subscriptions","organizations_url":"https://api.github.com/users/jcmm33/orgs","repos_url":"https://api.github.com/users/jcmm33/repos","events_url":"https://api.github.com/users/jcmm33/events{/privacy}","received_events_url":"https://api.github.com/users/jcmm33/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Azure/azure-mobile-services/labels/P3","name":"P3","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-11-14T17:09:12Z","updated_at":"2015-03-07T06:08:22Z","closed_at":null,"body":"Is there no way to cancel pending operations other than spinning up a new database?\r\n\r\nWe have the requirement for the mobile user to sometimes say 'just refresh from the server and loose anything I've done locally'.  Is the only way of doing this is spin up a new database ?"},"comment":{"url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/comments/77675689","html_url":"https://github.com/Azure/azure-mobile-services/issues/493#issuecomment-77675689","issue_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/493","id":77675689,"user":{"login":"phvannor","id":3979343,"avatar_url":"https://avatars.githubusercontent.com/u/3979343?v=3","gravatar_id":"","url":"https://api.github.com/users/phvannor","html_url":"https://github.com/phvannor","followers_url":"https://api.github.com/users/phvannor/followers","following_url":"https://api.github.com/users/phvannor/following{/other_user}","gists_url":"https://api.github.com/users/phvannor/gists{/gist_id}","starred_url":"https://api.github.com/users/phvannor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phvannor/subscriptions","organizations_url":"https://api.github.com/users/phvannor/orgs","repos_url":"https://api.github.com/users/phvannor/repos","events_url":"https://api.github.com/users/phvannor/events{/privacy}","received_events_url":"https://api.github.com/users/phvannor/received_events","type":"User","site_admin":false},"created_at":"2015-03-07T06:08:22Z","updated_at":"2015-03-07T06:08:22Z","body":"Ideally you could call the syncContext CancelAndUpdateItemAsync or CancelAndDiscardItemAsync for each op.  It looks like for some reason that takes an error and not an operation... Those two give you control over what you want to end up in the local db, while (hopefully) hiding implementation details.  Sadly you need to make an op error and probably get the op by doing a manual read.  Something we should improve here to make it easier to scan your ops, and handle them w/o triggering a push in this case."}}