{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/699","labels_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/699/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/699/comments","events_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/699/events","html_url":"https://github.com/Azure/azure-mobile-services/issues/699","id":76291612,"number":699,"title":"[iOS][Offline] Fields with nil value are ignored on push operations","user":{"login":"gsach","id":1922041,"avatar_url":"https://avatars.githubusercontent.com/u/1922041?v=3","gravatar_id":"","url":"https://api.github.com/users/gsach","html_url":"https://github.com/gsach","followers_url":"https://api.github.com/users/gsach/followers","following_url":"https://api.github.com/users/gsach/following{/other_user}","gists_url":"https://api.github.com/users/gsach/gists{/gist_id}","starred_url":"https://api.github.com/users/gsach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsach/subscriptions","organizations_url":"https://api.github.com/users/gsach/orgs","repos_url":"https://api.github.com/users/gsach/repos","events_url":"https://api.github.com/users/gsach/events{/privacy}","received_events_url":"https://api.github.com/users/gsach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Azure/azure-mobile-services/labels/Approved","name":"Approved","color":"02e10c"},{"url":"https://api.github.com/repos/Azure/azure-mobile-services/labels/iOS","name":"iOS","color":"e102d8"}],"state":"closed","locked":false,"assignee":{"login":"shrishrirang","id":11167859,"avatar_url":"https://avatars.githubusercontent.com/u/11167859?v=3","gravatar_id":"","url":"https://api.github.com/users/shrishrirang","html_url":"https://github.com/shrishrirang","followers_url":"https://api.github.com/users/shrishrirang/followers","following_url":"https://api.github.com/users/shrishrirang/following{/other_user}","gists_url":"https://api.github.com/users/shrishrirang/gists{/gist_id}","starred_url":"https://api.github.com/users/shrishrirang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shrishrirang/subscriptions","organizations_url":"https://api.github.com/users/shrishrirang/orgs","repos_url":"https://api.github.com/users/shrishrirang/repos","events_url":"https://api.github.com/users/shrishrirang/events{/privacy}","received_events_url":"https://api.github.com/users/shrishrirang/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-05-14T09:04:32Z","updated_at":"2015-07-20T16:37:45Z","closed_at":"2015-07-20T16:37:45Z","body":"When a record is updated locally, and an existing value is replaced with null, this change is not pushed to the server. This causes data loss. A workaround would be to use empty strings instead of null, but this solution doesn't work well for foreign keys.\r\n\r\nI inspected the code and found the reason why that issue happens. In the class MSCoreDataStore, the method:\r\n\r\n-(id) getRecordForTable:(NSString *)table itemId:(NSString *)itemId asDictionary:(BOOL)asDictionary orError:(NSError **)error\r\n\r\nis using NSDictionaryResultType on the fetch request. As a result, the null values are not added to the dictionary which is used to push the changes to the server."},"comment":{"url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/comments/122943210","html_url":"https://github.com/Azure/azure-mobile-services/issues/699#issuecomment-122943210","issue_url":"https://api.github.com/repos/Azure/azure-mobile-services/issues/699","id":122943210,"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-07-20T16:37:45Z","updated_at":"2015-07-20T16:37:45Z","body":"This I believe is fixed with Shrirangs PR, closing issue."}}