• 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
[Leopard] Core Data migration does not find legacy model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Leopard] Core Data migration does not find legacy model


  • Subject: [Leopard] Core Data migration does not find legacy model
  • From: Pierre Bernard <email@hidden>
  • Date: Thu, 1 Nov 2007 23:36:28 +0100

Hi!

I am trying to use Core Data model versioning and data migration.

I started writing version 2.0 of my application using the existing 1.0 model. Now that I have made changes to the model, I also created a mapping model. Reading files created prior to the model change works quite OK now (*). So I was pretty happy.

Then I went to grab a real 1.0 file. And: it cannot be read. Logging output seems to show that Core Data found neither source nor destination model:

MLogString(@"error: %@", *error);
MLogString(@"sourceModel: %@", [[*error userInfo] valueForKeyPath:@"sourceModel.versionIdentifiers"]);
MLogString(@"destinationModel: %@", [[*error userInfo] valueForKeyPath:@"destinationModel.versionIdentifiers"]);
MLogString(@"reason: %@", [[*error userInfo] valueForKeyPath:@"reason"]);


2007-11-01 22:46:26.189 HoudahSpot[7490:10b] Document.m:628 error: Error Domain=NSCocoaErrorDomain Code=134020 UserInfo=0x10d2470 "(null)"
2007-11-01 22:46:26.190 HoudahSpot[7490:10b] Document.m:629 sourceModel: (null)
2007-11-01 22:46:26.191 HoudahSpot[7490:10b] Document.m:630 destinationModel: (null)
2007-11-01 22:46:26.193 HoudahSpot[7490:10b] Document.m:635 reason: (null)


I have tried replacing the 1.0 model in my project with the actual 1.0 model. They ought to be the same and probably are. Anyway it does not help.

What can I infer from the 134020 error code?

How come Core Data even goes to forget what the destination model ought to be?

How could my fake 1.0 files be different from real 1.0 files given they were created using the exact same model?

Pierre

(*) As far as I can see, the beginEntityMapping:manager:error: method of my custom policies is not called. Wonder what I am doing wrong here?

---
Pierre Bernard
http://www.bernard-web.com/pierre
http://www.houdah.com



_______________________________________________

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: Core Animation: Layer vs NSTextView
  • Next by Date: Re: Core Data troubles - not removing objects
  • Previous by thread: Re: Why is NSWindow's setCanBeVisibleOnAllSpaces: deprecated?
  • Next by thread: Choppy Core Animation
  • Index(es):
    • Date
    • Thread