Core Data Merged Models
Core Data Merged Models
- Subject: Core Data Merged Models
- From: Jonathon Mah <email@hidden>
- Date: Sat, 22 Apr 2006 18:43:09 +0930
The template code for a "Cocoa Core Data Application" creates a
managed object model with the following code:
NSMutableSet *allBundles = [[NSMutableSet alloc] init];
[allBundles addObject:[NSBundle mainBundle]];
[allBundles addObjectsFromArray:[NSBundle allFrameworks]];
managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles:
[allBundles allObjects]] retain];
What is the purpose of merging models contained in frameworks? In
other words, what advantage does this have over
[[NSManagedObjectModel alloc] initWithURL:myMomURL] (apart from not
needing to know the URL)?
If the user added a framework to the system which contained its own
MOM, could that render existing stores unreadable by apps using this
code?
Thanks,
Jonathon Mah
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden