{"action":"created","issue":{"url":"https://api.github.com/repos/JohnEstropia/CoreStore/issues/44","repository_url":"https://api.github.com/repos/JohnEstropia/CoreStore","labels_url":"https://api.github.com/repos/JohnEstropia/CoreStore/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/JohnEstropia/CoreStore/issues/44/comments","events_url":"https://api.github.com/repos/JohnEstropia/CoreStore/issues/44/events","html_url":"https://github.com/JohnEstropia/CoreStore/issues/44","id":131347340,"number":44,"title":"Observing changes by a single transaction","user":{"login":"fractious","id":5934,"avatar_url":"https://avatars.githubusercontent.com/u/5934?v=3","gravatar_id":"","url":"https://api.github.com/users/fractious","html_url":"https://github.com/fractious","followers_url":"https://api.github.com/users/fractious/followers","following_url":"https://api.github.com/users/fractious/following{/other_user}","gists_url":"https://api.github.com/users/fractious/gists{/gist_id}","starred_url":"https://api.github.com/users/fractious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fractious/subscriptions","organizations_url":"https://api.github.com/users/fractious/orgs","repos_url":"https://api.github.com/users/fractious/repos","events_url":"https://api.github.com/users/fractious/events{/privacy}","received_events_url":"https://api.github.com/users/fractious/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T13:28:33Z","updated_at":"2016-02-05T03:23:46Z","closed_at":null,"body":"Is there a way of compiling a changeset of CRUD operations that occurred within a given `transaction`? I see that `commit()` returns a `SaveResult` but that doesn't look to say much about the operations that occurred. Would it be difficult to extend `SaveResult` in this way?\r\n\r\nAlternatively, is it possible to scope a ListMonitor to a transaction somehow?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/JohnEstropia/CoreStore/issues/comments/180173784","html_url":"https://github.com/JohnEstropia/CoreStore/issues/44#issuecomment-180173784","issue_url":"https://api.github.com/repos/JohnEstropia/CoreStore/issues/44","id":180173784,"user":{"login":"JohnEstropia","id":3029684,"avatar_url":"https://avatars.githubusercontent.com/u/3029684?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnEstropia","html_url":"https://github.com/JohnEstropia","followers_url":"https://api.github.com/users/JohnEstropia/followers","following_url":"https://api.github.com/users/JohnEstropia/following{/other_user}","gists_url":"https://api.github.com/users/JohnEstropia/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnEstropia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnEstropia/subscriptions","organizations_url":"https://api.github.com/users/JohnEstropia/orgs","repos_url":"https://api.github.com/users/JohnEstropia/repos","events_url":"https://api.github.com/users/JohnEstropia/events{/privacy}","received_events_url":"https://api.github.com/users/JohnEstropia/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T03:23:46Z","updated_at":"2016-02-05T03:23:46Z","body":"@fractious Yup, I understand the need. I'm trying to implement automatic CoreSpotlight indexing and bookkeeping changesets is one of the requirements to make it work. Once I get it working I may expose the CRUD changes somewhere.\r\n\r\nThere's no working prototype yet but you can glimpse of the progress in the `_corespotlight-test` branch. In the `NSManagedObjectContext+CoreSpotlight.swift` file, I intend to twiddle with the\r\n`insertedObjects:`, `updatedObjects`, and `deletedObjects` info from the context.\r\n\r\n> Alternatively, is it possible to scope a ListMonitor to a transaction somehow?\r\nIt doesn't make sense with async and sync transactions (their context dies with the closure they run in), but we can allow `UnsafeDataTransaction` to create their own ListMonitors/ObjectMonitors. I'm not sure if it will help your requirements right now but it seems simple and sensible enough to implement.\r\n"}}