• 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: During Migration, should use Primitive Accessors only?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: During Migration, should use Primitive Accessors only?


  • Subject: Re: Core Data: During Migration, should use Primitive Accessors only?
  • From: Jerry Krinock <email@hidden>
  • Date: Thu, 18 Nov 2010 06:17:43 -0800

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 (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: During Migration, should use Primitive Accessors only?
      • From: Quincey Morris <email@hidden>
    • Re: Core Data: During Migration, should use Primitive Accessors only?
      • From: Adam Swift <email@hidden>
References: 
 >Core Data: During Migration, should use Primitive Accessors only? (From: Jerry Krinock <email@hidden>)
 >Re: Core Data: During Migration, should use Primitive Accessors only? (From: Adam Swift <email@hidden>)
 >Re: Core Data: During Migration, should use Primitive Accessors only? (From: Jerry Krinock <email@hidden>)
 >Re: Core Data: During Migration, should use Primitive Accessors only? (From: Adam Swift <email@hidden>)
 >Re: Core Data: During Migration, should use Primitive Accessors only? (From: Jerry Krinock <email@hidden>)
 >Re: Core Data: During Migration, should use Primitive Accessors only? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: readonly property which is a mutable array
  • Next by Date: Re: Variable declaration in "for" loop initialization expression?
  • Previous by thread: Re: Core Data: During Migration, should use Primitive Accessors only?
  • Next by thread: Re: Core Data: During Migration, should use Primitive Accessors only?
  • Index(es):
    • Date
    • Thread