How to update child managed object context so it has the same data with parent?
As far as I know, when saving, child only goes one step, namely to parents. Yet when fetching fetch always go really deep all the way to the parent and persistent store. So I expect things will be the same.
Yet it's not.
I have a managed object context that is parent of all other managed object context.
One child change data and save. The parent is also changed. I do executeFetchRequest on parent and I see that the data change.
However, some child of the parents still use old data. Same object id same data. Somehow the value of the property remain the same.
How to tell the child to reload fresh data from the parent?
To be more exact
Say P is the parent
Say it has C1 C2 C3 as child
Then C1 changes data and commit. The change is propagated to P. However, executing executeFetchRequest at C2 and C3 still shows old data.
What gives?
For example, when I check for the imageBlob property, this is what I get:
Child:
2013-02-05 13:57:42.865 BadgerNew[78801:c07] imageBlob: <UIImage: 0x89c3c50>
2013-02-05 13:57:42.866 BadgerNew[78801:c07] imageBlob: <null>
2013-02-05 13:57:42.866 BadgerNew[78801:c07] imageBlob: <null>
2013-02-05 13:57:42.866 BadgerNew[78801:c07] imageBlob: <null>
Parent:
2013-02-05 13:57:42.868 BadgerNew[78801:c07] imageBlob: <UIImage: 0x114af650>
2013-02-05 13:57:42.868 BadgerNew[78801:c07] imageBlob: <UIImage: 0x8e492e0>
2013-02-05 13:57:42.868 BadgerNew[78801:c07] imageBlob: <UIImage: 0x114c79b0>
2013-02-05 13:57:42.869 BadgerNew[78801:c07] imageBlob: <UIImage: 0xa8c76e0>
Here is a more comprehensive version why I jot down the moc, the parent moc, the blob, the URL and the object ID. Child:
In particular I want the mainqueue managedobject context to be another child of the parent rather than the parent of all other managedObjectContext. On the other hand, I also want the mainQueue Managed object context to have uptodate information. I wonder what the standard solution be.