Re: Core Data migration: how to delete some managed objects?
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