• 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: Core Data Lightweight Migration Woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Lightweight Migration Woes


  • Subject: Re: Core Data Lightweight Migration Woes
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 19 Aug 2010 17:50:53 -0700

On Aug 19, 2010, at 14:31, Brad Gibbs wrote:

> 	// create object for prototype model
> 	NSString *prototypePath = [[NSBundle mainBundle] pathForResource:@"IconConfig" ofType:@"mom"];
>
> 	if (prototypePath == nil) {
> 		prototypePath = [[NSBundle mainBundle] pathForResource:@"IconConfig" ofType:@"momd"];
> 	}
> 	NSLog(@"Prototype path is %@", prototypePath);

What is shown as the prototype path?

Note that there *is* (presumably) a resource called IconConfig.mom -- inside the IconConfig.momd directory -- which contains your current model. If your code is finding that, then it won't look for IconConfig.momd, and so the returned model will look (presumably) to Core Data as if there's only one version.

Have you tried reversing this test, so that it finds the momd resource first, and only looks for the mom resource if there's no momd?

Also, have you tried examining the results of NSMappingModel’s inferredMappingModelForSourceModel:destinationModel:error: method?


_______________________________________________

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: 
 >Core Data Lightweight Migration Woes (From: Brad Gibbs <email@hidden>)

  • Prev by Date: Set the Cursor Position
  • Next by Date: Re: Set the Cursor Position
  • Previous by thread: Core Data Lightweight Migration Woes
  • Next by thread: Re: Core Data Lightweight Migration Woes
  • Index(es):
    • Date
    • Thread