• 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
Core Data : endEntityMapping:manager:error: Sent to different *instance*
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data : endEntityMapping:manager:error: Sent to different *instance*


  • Subject: Core Data : endEntityMapping:manager:error: Sent to different *instance*
  • From: Jerry Krinock <email@hidden>
  • Date: Wed, 15 Sep 2010 05:04:31 -0700

In NSEntityMigrationPolicy Class Reference, I read:

beginEntityMapping:manager:error:
Invoked by the migration manager at the start of a given entity mapping.

endEntityMapping:manager:error:
Invoked by the migration manager at the end of a given entity mapping.

Simple enough.  However, I find that in mysubclass, beginEntityMapping:manager:error: is sent to a certain instance, then createDestinationInstancesForSourceInstance:::: is sent to the same instance, once for each object in the store.  So far, so good.  But then endEntityMapping:manager:error: is sent to a *different instance*!  Makes it difficult to log a summary based on instance variables.

What could be the logic of this?

Jerry Krinock

Following is an abridged console log when I log the method name, 'self', the 'mapping' parameter and the 'manager' parameter in each of the three methods.  The middle method is invoked once for each of three objects in the store, so there are 5 lines.  Note that 'mapping' and 'manager' are always the same but 'self' is different in the last line.

-beginEntityMapping::: self:0x176d3070 mapping:0x176d2ef0 manager:0x1eb02680
-createDestinationInstancesForSourceInstance:::: self:0x176d3070 mapping:0x176d2ef0 manager:0x1eb02680
-createDestinationInstancesForSourceInstance:::: self:0x176d3070 mapping:0x176d2ef0 manager:0x1eb02680
-createDestinationInstancesForSourceInstance:::: self:0x176d3070 mapping:0x176d2ef0 manager:0x1eb02680
-endEntityMapping::: self:0x1eb67880 mapping:0x176d2ef0 manager:0x1eb02680

_______________________________________________

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: Make checkbox in table view uneditable
  • Next by Date: [Job] Develop at Skype
  • Previous by thread: What does the column Z_OPT do in Core Data sqlite table?
  • Next by thread: [Job] Develop at Skype
  • Index(es):
    • Date
    • Thread