• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data Merged Models
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Core Data Merged Models
      • From: Matthew Firlik <email@hidden>
    • Re: Core Data Merged Models
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Usage of +class
  • Next by Date: Re: Usage of +class
  • Previous by thread: Re: Usage of +class
  • Next by thread: Re: Core Data Merged Models
  • Index(es):
    • Date
    • Thread