Hi, I have an application where I have a model for all the data of the 
application, but sometimes I want to replace a subtree within the object graph 
with a new set of objects loaded from a file. I am looking for advice on the 
best way to handle this.

If I created a completely separate model, then I would have to have a lot of 
the same object definitions in both models, and maintenance would be a 
nightmare.

These same classes are necessary in both the main data and the subset, so I 
don't think that the merged models thing works.

One thing I thought was the possibility of loading it using the same persistent 
store definition, but when it is that file type, it will just load this subset 
of the objects (it's an NSAtomicStore subclass) into a separate context, and 
then I use the objects from that context and migrate them to my main document 
context, replacing the objects that are there. Would that be a good solution?

Any advice on how to handle this would be very welcome.

Thanks

Gideon



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to