{"action":"created","issue":{"url":"https://api.github.com/repos/devlucky/Kakapo/issues/31","repository_url":"https://api.github.com/repos/devlucky/Kakapo","labels_url":"https://api.github.com/repos/devlucky/Kakapo/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/devlucky/Kakapo/issues/31/comments","events_url":"https://api.github.com/repos/devlucky/Kakapo/issues/31/events","html_url":"https://github.com/devlucky/Kakapo/issues/31","id":148867376,"number":31,"title":"Support Deletion and Overwrite in database","user":{"login":"MP0w","id":1812932,"avatar_url":"https://avatars.githubusercontent.com/u/1812932?v=3","gravatar_id":"","url":"https://api.github.com/users/MP0w","html_url":"https://github.com/MP0w","followers_url":"https://api.github.com/users/MP0w/followers","following_url":"https://api.github.com/users/MP0w/following{/other_user}","gists_url":"https://api.github.com/users/MP0w/gists{/gist_id}","starred_url":"https://api.github.com/users/MP0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MP0w/subscriptions","organizations_url":"https://api.github.com/users/MP0w/orgs","repos_url":"https://api.github.com/users/MP0w/repos","events_url":"https://api.github.com/users/MP0w/events{/privacy}","received_events_url":"https://api.github.com/users/MP0w/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/devlucky/Kakapo/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/devlucky/Kakapo/labels/feature","name":"feature","color":"12ea69"}],"state":"open","locked":false,"assignee":{"login":"joanromano","id":1227808,"avatar_url":"https://avatars.githubusercontent.com/u/1227808?v=3","gravatar_id":"","url":"https://api.github.com/users/joanromano","html_url":"https://github.com/joanromano","followers_url":"https://api.github.com/users/joanromano/followers","following_url":"https://api.github.com/users/joanromano/following{/other_user}","gists_url":"https://api.github.com/users/joanromano/gists{/gist_id}","starred_url":"https://api.github.com/users/joanromano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joanromano/subscriptions","organizations_url":"https://api.github.com/users/joanromano/orgs","repos_url":"https://api.github.com/users/joanromano/repos","events_url":"https://api.github.com/users/joanromano/events{/privacy}","received_events_url":"https://api.github.com/users/joanromano/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/devlucky/Kakapo/milestones/2","html_url":"https://github.com/devlucky/Kakapo/milestones/Beta-1","labels_url":"https://api.github.com/repos/devlucky/Kakapo/milestones/2/labels","id":1707765,"number":2,"title":"Beta-1","description":"First feature complete milestone","creator":{"login":"MP0w","id":1812932,"avatar_url":"https://avatars.githubusercontent.com/u/1812932?v=3","gravatar_id":"","url":"https://api.github.com/users/MP0w","html_url":"https://github.com/MP0w","followers_url":"https://api.github.com/users/MP0w/followers","following_url":"https://api.github.com/users/MP0w/following{/other_user}","gists_url":"https://api.github.com/users/MP0w/gists{/gist_id}","starred_url":"https://api.github.com/users/MP0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MP0w/subscriptions","organizations_url":"https://api.github.com/users/MP0w/orgs","repos_url":"https://api.github.com/users/MP0w/repos","events_url":"https://api.github.com/users/MP0w/events{/privacy}","received_events_url":"https://api.github.com/users/MP0w/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2016-04-14T21:40:37Z","updated_at":"2016-04-16T17:48:34Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-04-16T16:29:14Z","updated_at":"2016-04-17T13:40:58Z","closed_at":null,"body":"Delete and update entities is not supported.\r\nAs discussed we won't support:\r\n```swift\r\nuser.delete()\r\nuser.save()\r\n```\r\n\r\nThis would require every entity to hold a database so extra setup for the user.\r\nThe idea is to provide:\r\n```\r\ndb.delete(entity)\r\ndb.save(entity) // or replace/createIfNeeded/.... [discussion]\r\n```\r\n\r\n`KakapoDB` will have to find the entity, make sure that is equal (not only the id) to prevent removing another entity and/or using the wrong database. \r\n\r\nIf an entity changes and is not saved into db delete will fail because doesn't match the entity in db."},"comment":{"url":"https://api.github.com/repos/devlucky/Kakapo/issues/comments/211017372","html_url":"https://github.com/devlucky/Kakapo/issues/31#issuecomment-211017372","issue_url":"https://api.github.com/repos/devlucky/Kakapo/issues/31","id":211017372,"user":{"login":"joanromano","id":1227808,"avatar_url":"https://avatars.githubusercontent.com/u/1227808?v=3","gravatar_id":"","url":"https://api.github.com/users/joanromano","html_url":"https://github.com/joanromano","followers_url":"https://api.github.com/users/joanromano/followers","following_url":"https://api.github.com/users/joanromano/following{/other_user}","gists_url":"https://api.github.com/users/joanromano/gists{/gist_id}","starred_url":"https://api.github.com/users/joanromano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joanromano/subscriptions","organizations_url":"https://api.github.com/users/joanromano/orgs","repos_url":"https://api.github.com/users/joanromano/repos","events_url":"https://api.github.com/users/joanromano/events{/privacy}","received_events_url":"https://api.github.com/users/joanromano/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T13:40:58Z","updated_at":"2016-04-17T13:40:58Z","body":"@MP0w what else do we have appart from the id to compare? Should we make `Serializable` conform to `Comparable`?"}}