{"action":"created","issue":{"url":"https://api.github.com/repos/hyperoslo/Sync/issues/116","labels_url":"https://api.github.com/repos/hyperoslo/Sync/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/hyperoslo/Sync/issues/116/comments","events_url":"https://api.github.com/repos/hyperoslo/Sync/issues/116/events","html_url":"https://github.com/hyperoslo/Sync/issues/116","id":101138846,"number":116,"title":"[Question] Is it possible to only add/update records but not deleting unpresented?","user":{"login":"d6u","id":2153667,"avatar_url":"https://avatars.githubusercontent.com/u/2153667?v=3","gravatar_id":"","url":"https://api.github.com/users/d6u","html_url":"https://github.com/d6u","followers_url":"https://api.github.com/users/d6u/followers","following_url":"https://api.github.com/users/d6u/following{/other_user}","gists_url":"https://api.github.com/users/d6u/gists{/gist_id}","starred_url":"https://api.github.com/users/d6u/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d6u/subscriptions","organizations_url":"https://api.github.com/users/d6u/orgs","repos_url":"https://api.github.com/users/d6u/repos","events_url":"https://api.github.com/users/d6u/events{/privacy}","received_events_url":"https://api.github.com/users/d6u/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-15T04:14:06Z","updated_at":"2015-08-15T04:25:42Z","closed_at":"2015-08-15T04:25:42Z","body":"Assuming I'm building a Twitter client. I only want to fetch new tweets and save them. Old tweets not presented during a syncing should remain the same. I know I can use predicate to exclude all existing tweets to prevent them from deleted. But is there an option to not delete unpresented tweets?\r\nIf this is not a feature Sync would target, is there any alternative library to do so?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/hyperoslo/Sync/issues/comments/131292964","html_url":"https://github.com/hyperoslo/Sync/issues/116#issuecomment-131292964","issue_url":"https://api.github.com/repos/hyperoslo/Sync/issues/116","id":131292964,"user":{"login":"3lvis","id":1088217,"avatar_url":"https://avatars.githubusercontent.com/u/1088217?v=3","gravatar_id":"","url":"https://api.github.com/users/3lvis","html_url":"https://github.com/3lvis","followers_url":"https://api.github.com/users/3lvis/followers","following_url":"https://api.github.com/users/3lvis/following{/other_user}","gists_url":"https://api.github.com/users/3lvis/gists{/gist_id}","starred_url":"https://api.github.com/users/3lvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3lvis/subscriptions","organizations_url":"https://api.github.com/users/3lvis/orgs","repos_url":"https://api.github.com/users/3lvis/repos","events_url":"https://api.github.com/users/3lvis/events{/privacy}","received_events_url":"https://api.github.com/users/3lvis/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T04:25:42Z","updated_at":"2015-08-15T04:25:42Z","body":"Hey, there's no such \"feature\" in Sync at the moment, but it could be way simpler than having a predicate with all the existing tweets. You could use the latest created date, updated date or the latest date when you refreshed items from the backend and say.\r\n\r\n```objc\r\nNSPredicate *predicate = [NSPredicate predicateWithFormat:@\"createdAt > \"02-01-2015 21:21:00 +000\"]; // Only sync tweets after \"02-01-2015 21:21:00 +000\". Of course using an NSDate instead of the string that I wrote.\r\n\r\n[Sync changes:JSON\r\ninEntityNamed:@\"Tweet\"\r\n    predicate: predicate\r\n    dataStack:dataStack\r\n   completion:^{\r\n       //...\r\n    }];\r\n```\r\n\r\nI don't know of other libraries that do the same than Sync that have this feature.\r\n\r\nI hope this was useful!\r\n\r\n:v: "}}