I have a NSManagedObjectContext
set to have a NSPrivateQueueConcurrencyType
which I'm using most of the time across my app.
As well as this I created a child MOC with NSMainQueueConcurrencyType
for use with cocoa bindings (I hear that bindings don't work with private queue MOCs). I have bound some ObjectController
s and an ArrayController
to this child context. I very much want to keep the child on the main queue rather than swapping the MOC queue types.
When I make changes to the bound objects via UI, the changes don't propagate up to the parent context. And when I make changes to the parent context, they don't filter down to the Object/ArrayControllers.
How can I make this happen? Is there a setting that will tell the Object/ArrayControllers to refresh their context appropriately and save it when they make changes?
To bring changes to the parent, you need to save the child. If you want to save the changes persistently, you also need to save the parent after that.
To bring changes from parent to the child, you need either merge changes using a notification method from parent's
NSManagedObjectContextDidSaveNotification
or re-fetch in child context. Merging is probably better in your case.