• 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
Chained Migration of Leopard CoreData stores
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Chained Migration of Leopard CoreData stores


  • Subject: Chained Migration of Leopard CoreData stores
  • From: Ruotger Skupin <email@hidden>
  • Date: Wed, 16 Apr 2008 12:59:05 +0200

Hi,

let's say I have four versions of my data model:

DataModel1.xcdatamodel
DataModel2.xcdatamodel
DataModel3.xcdatamodel
DataModel4.xcdatamodel (this is the current one)

and three model mapping files which always map from version n to version n+1:

Mapping1to2.xcmappingmodel
Mapping2to3.xcmappingmodel
Mapping3to4.xcmappingmodel


Now I load a version 1 data file:

NSDictionary *options = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:NSMigratePersistentStoresAutomaticallyOption];
NSError *error = nil;
if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:url options:options error:&error])
{
...
}


should the data file automatically be migrated to the current version 4 or do I need a single direct mapping like this:

Mapping1to4.xcmappingmodel


Ruotger

_______________________________________________

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


  • Prev by Date: Re: Getting feedback from application
  • Next by Date: HICocoaViewCreate question
  • Previous by thread: Re: Enabling File Open/Save etc in a non-document-based application
  • Next by thread: re: Chained Migration of Leopard CoreData stores
  • Index(es):
    • Date
    • Thread