Re: Core Data : Managed Object Models : Configurations, Versions
Re: Core Data : Managed Object Models : Configurations, Versions
- Subject: Re: Core Data : Managed Object Models : Configurations, Versions
- From: Jerry Krinock <email@hidden>
- Date: Wed, 16 Jun 2010 08:59:39 -0700
On 2010 Jun 16, at 02:54, Jack Nutting wrote:
> You asked when the merging is done: That's the spot! The
> mergedModelFromBundles: method creates a big combined model out of all
> the models your app contains.
Thank you, Jack. OK, I didn't write that very well. Let me ask it this way:
Whereas: Apple seems to recommend that all entities be thrown into a common data model resource and segregated if desired using "configurations"
Whereas: There is no need to merge different versions of the same data model resource, and indeed doing so would probably fail due to conflicting entities
Then: Why do we have four methods for merging models? Why would a developer want models to be merged at runtime?
>> Eeek. Is this merging my old and current model versions?
>>
>> If so, why doesn't that give me "Can't merge models with same entities" errors?
>
> It's not merging your old and current model versions, because (I
> assume) you've done the appropriate hand-waving to tell Xcode to deal
> with your versioned model, giving you all those nice migration
> features etc.
Yes, I have.
> At run-time, CD is smart enough to just grab the latest
> version of each model it finds.
Indeed. But how can I hook into those Core Data Smarts? What method does Core Data use to determine which of the data model resources is the current one? How does that green checkmark in Xcode get packaged into the app? How does Core Data even know that a group of data model resources are different versions of the same model and should not be merged?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden