• 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
Re: Preparing for MOM versioning in version 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preparing for MOM versioning in version 1


  • Subject: Re: Preparing for MOM versioning in version 1
  • From: mmalc Crawford <email@hidden>
  • Date: Mon, 26 Oct 2009 11:53:28 -0700

On Oct 26, 2009, at 9:00 am, Fritz Anderson wrote:

> I'm about to unleash a Core Data-based application, and I'm sure the schema will change in later versions. The Core Data Model Versioning and Data Migration Programming Guide seems to say that migrating a store from one version to another, at least in simple cases, is magical: The application embeds the historical MOMs, with one of them marked "current," and when a store built to an earlier model is opened, it is (in SIMPLE cases) migrated to the current model.
> Is this the case?
>

It's not clear what the question is.  The implication appears to be that the documentation is simply presenting a fiction of functionality that's not actually present.


It's not magical.

Per the Guide (<http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmLightweight.html#//apple_ref/doc/uid/TP40008426>):

"To request automatic lightweight migration, you set appropriate flags in the options dictionary you pass inaddPersistentStoreWithType:configuration:URL:options:error:. You need to set values corresponding to both the NSMigratePersistentStoresAutomaticallyOption and the NSInferMappingModelAutomaticallyOption keys to YES..."


The (iPhone) PhotoLocations example (<http://developer.apple.com/iphone/library/samplecode/PhotoLocations/>) illustrates the feature.

mmalc


_______________________________________________

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

References: 
 >Preparing for MOM versioning in version 1 (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Custom NSScroller
  • Next by Date: Re: Getting a handle on inf
  • Previous by thread: Re: Preparing for MOM versioning in version 1
  • Next by thread: Custom NSScroller
  • Index(es):
    • Date
    • Thread