• 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 migration: how to delete some managed objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data migration: how to delete some managed objects?


  • Subject: Re: Core Data migration: how to delete some managed objects?
  • From: Sean McBride <email@hidden>
  • Date: Tue, 05 Mar 2013 17:25:41 -0500
  • Organization: Rogue Research Inc.

On Mon, 4 Mar 2013 22:17:44 -0800, Jerry Krinock said:

>This is easy to do with a mapping model, migration policy and migration
>manager.  In your NSMigrationManager subclass implementation, implement
>an override something like this…
>
>- (BOOL)createDestinationInstancesForSourceInstance:
>(NSManagedObject*)oldInstance

Thanks Jerry,

I've been playing with this today and it looks promising.  I remember looking at it before but being scared off by the comment in the docs "If you override this method and do not invoke super, you must invoke NSMigrationManager’s associateSourceInstance:withDestinationInstance:forEntityMapping: to associate the source and destination instances as required" which I took to mean that I *had to* create a destination instance.  (Passing nil for 'withDestinationInstance:' goes poof.)  I take it you are using your technique successfully in practice?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data migration: how to delete some managed objects?
      • From: Jerry Krinock <email@hidden>
References: 
 >Core Data migration: how to delete some managed objects? (From: Sean McBride <email@hidden>)
 >Re: Core Data migration: how to delete some managed objects? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: "Speech" item in WebView contextual menus
  • Next by Date: Re: Core Data migration: how to delete some managed objects?
  • Previous by thread: Re: Core Data migration: how to delete some managed objects?
  • Next by thread: Re: Core Data migration: how to delete some managed objects?
  • Index(es):
    • Date
    • Thread