Re: Core Data Lightweight Migration Woes
Re: Core Data Lightweight Migration Woes
- Subject: Re: Core Data Lightweight Migration Woes
- From: Jack Nutting <email@hidden>
- Date: Sat, 21 Aug 2010 16:37:57 +0200
On Fri, Aug 20, 2010 at 8:46 PM, Brad Gibbs <email@hidden> wrote:
> I highlighted the .xcdatamodel and did a Design > Data Model > Add New
> Version. That created the Config.xcdatamodeld with an unnumbered version of
> the datamodel (Config.xcdatamodel) and a numbered copy named Config
> 2.xcdatamodel.
> I go into Config.xcdatamodel and add a single string attribute to one
> entity, Clean and Build & Go. I get the missing source model error.
I think you're looking at the versioning the wrong way around! The
data model with the "2" in its name is the new one, THAT's where you
should add new attributes etc. When your app runs, it will find the
existing data store which is version "1", both model files (the old
one is "1", the new one is "2"), and do the conversion for you.
I don't have it in front of me, but I think that if you bring up the
info window for each of the model files, you'll see that each shows a
version number. Core Data will always work to bring lower-versioned
data stores up to whatever you've marked as the current version.
--
// jack
// http://nuthole.com
// http://learncocoa.org
_______________________________________________
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