My situation is: I have a multi-threaded app with core-data database, managing multiple contexts. In my context Hieratchy I have a Root Saving Context, and child contexts where I fetch data and make/save changes.
- Context A -> Root parent context
- Context B -> Child context of A
- Context C -> Child context of A
Context B is used to fetch data and be displayed in a View Controller's view.
Context C is used to save changes in a background thread.
The problem is that when I make changes in context C, save context C and A, the changes are not propagated, or merged, into context B. The changes are correctly persisted in context A and C, but not in B.
I thought that the default behaviour would be that the changes in a parent context A would be propagated into it's child context B, but it's not happening. What would be the correct way to achieve this?