Core Data updating from one model to another.
Hi,
i am not sure if the title correctly explain my problem, and i am new to core data development.
I have multiple coredata models in my app.
let's say:
model1.xcdatamodel and model2.xcdatamodel, there are some entities within them, and the model1.xcdatamodel updates by itself(some webservices stuff), and i need to update model2.xcdatamodel from model1.xcdatamodel(by checking what's been added to model1).
For example: model1 stores Users. When there is a new user added to it, i need to update model2 to have the new user.
i know i can do some for/if-statements, but it looks like the stupid way to do it, also will slow down the performance.
from looking in the Core Data reference, Using contextDidSave() or mergeChangesFromContextDidSaveNotification or something like this should be the ideas to go with. could you please provide your suggestions?
really appreciate about this help.
|