On 2010 Nov 16, at 16:51, Quincey Morris wrote:

> 2. If you have a *custom* NSManagedObject subclass (i.e. whose subclass name 
> is known to the Core Data entity), you can of course override the 
> Core-Data-supplied accessor methods by writing your own. Adam was saying that 
> there isn't supposed to be any legal way to use such custom subclasses during 
> migration.

Thanks, Quincey.  My claims are that such usage should not happen, and indeed 
you don't want it to happen, but if you're not careful, it will happen…

1.  If you invoke -(set)foo of -(setValue:)forKey: during a migration, and you 
have overridden accessors with custom accessors, Core Data will find the custom 
accessors and use them.

2.  This will cause undesirable results.

3.  To prevent Core Data from using the custom accessors during migration, use 
the "…Primitive…" accessors instead.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to