{"action":"created","issue":{"url":"https://api.github.com/repos/marcoarment/FCModel/issues/98","labels_url":"https://api.github.com/repos/marcoarment/FCModel/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/marcoarment/FCModel/issues/98/comments","events_url":"https://api.github.com/repos/marcoarment/FCModel/issues/98/events","html_url":"https://github.com/marcoarment/FCModel/issues/98","id":42163977,"number":98,"title":"\"FCModel 2\" non-unique-instances branch","user":{"login":"marcoarment","id":366193,"avatar_url":"https://avatars.githubusercontent.com/u/366193?v=3","gravatar_id":"","url":"https://api.github.com/users/marcoarment","html_url":"https://github.com/marcoarment","followers_url":"https://api.github.com/users/marcoarment/followers","following_url":"https://api.github.com/users/marcoarment/following{/other_user}","gists_url":"https://api.github.com/users/marcoarment/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoarment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoarment/subscriptions","organizations_url":"https://api.github.com/users/marcoarment/orgs","repos_url":"https://api.github.com/users/marcoarment/repos","events_url":"https://api.github.com/users/marcoarment/events{/privacy}","received_events_url":"https://api.github.com/users/marcoarment/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":56,"created_at":"2014-09-08T04:39:58Z","updated_at":"2015-06-04T17:56:47Z","closed_at":null,"body":"Just pushed the first commit e0f9b3d3 of what might be called \"FCModel 2\" to the \"non-unique-instances\" branch. This is a __big, likely-breaking change__ that applies a lot of lessons learned since the original design:\r\n\r\n__Instances are no longer tracked or kept unique in memory. All instances are \"detached\".__\r\n\r\n* You can have two instances in memory of the same logical model (same table and primary key).\r\n* Changes made to a model object or table won't affect any other copies in memory.\r\n* If you want your interface to react to changes, you must reload any data in response to FCModel's change notifications.\r\n* `dataWasUpdatedExternally`, reloads, and conflict resolution are no longer necessary and have been removed.\r\n* `allLoadedInstances` is no longer possible and has been removed.\r\n* Transactions are now supported, although limited. (Rollbacks don't revert changed models in memory.)\r\n* Autoincrement, formerly deprecated, is now removed and will raise an exception.\r\n\r\n__All saves and deletes are expected to succeed. Saves shouldn't unexpectedly fail or be blocked.__\r\n\r\n* Removed `should/didInsert/Update/Delete`, `saveWasRefused`, `saveDidFail`. To customize behavior, override `save` and call `[super save]` from the subclass.\r\n* `FCModelSaveResult` is removed. `delete` now returns void and `save` now returns a BOOL to indicate whether changes were made.\r\n* Saves and deletes that fail from database errors now raise exceptions. `lastSQLiteError` is removed.\r\n* All FCModel exceptions now have name `FCModelException`.\r\n* `saveAll` has been removed. Saves should happen intentionally, right after you change the data.\r\n* Custom serializations for `NSURL`, `NSDate`, etc. have been removed to avoid a lot of subtle bugs and inconsistencies between formats.\r\n\r\n__Notifications have been simplified to just a single FCModelChangeNotification for any change to a table.__\r\n\r\n* `FCModelInstanceSetKey` has been replaced by `FCModelInstanceKey` and will always be one instance if known, or unset for many/unknown.\r\n* Notification-batching functions are now redundant and have been removed since transactions also batch notifications.\r\n\r\nTake a look and see what you think so far. What other changes should we consider now that we're breaking things?\r\n\r\n__PLEASE don't ship any apps with this yet.__\r\n"},"comment":{"url":"https://api.github.com/repos/marcoarment/FCModel/issues/comments/108991547","html_url":"https://github.com/marcoarment/FCModel/issues/98#issuecomment-108991547","issue_url":"https://api.github.com/repos/marcoarment/FCModel/issues/98","id":108991547,"user":{"login":"prendio2","id":235807,"avatar_url":"https://avatars.githubusercontent.com/u/235807?v=3","gravatar_id":"","url":"https://api.github.com/users/prendio2","html_url":"https://github.com/prendio2","followers_url":"https://api.github.com/users/prendio2/followers","following_url":"https://api.github.com/users/prendio2/following{/other_user}","gists_url":"https://api.github.com/users/prendio2/gists{/gist_id}","starred_url":"https://api.github.com/users/prendio2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prendio2/subscriptions","organizations_url":"https://api.github.com/users/prendio2/orgs","repos_url":"https://api.github.com/users/prendio2/repos","events_url":"https://api.github.com/users/prendio2/events{/privacy}","received_events_url":"https://api.github.com/users/prendio2/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T17:56:47Z","updated_at":"2015-06-04T17:56:47Z","body":"@marcoarment OK. My rationale is I want to get the id of the changed object to avoid doing a complete reload each time any object changes. Maybe I'll add an id to the user info dict rather than the FCModel object itself."}}