• 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 reserved property names?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data reserved property names?


  • Subject: Core Data reserved property names?
  • From: Florent Pillet <email@hidden>
  • Date: Mon, 05 Nov 2007 17:43:59 +0100

I got bit by a funny problem today. I was handed a project with a datamodel in which a table had a boolean property named "readOnly". Chasing a bug where none of the objects I created has this property set, I discovered that doing:

[object setValue:[NSNumber numberWithBool:YES] forKey:@"readOnly"];

would actually NOT change the property's value. Apparently, this is a side effect of KVC since changing the property name to anything else (i.e. "readOnly1") would get the code back working.

Soo .. my question is: how many of these non-obvious reserved names are hidden in Core Data? I say non-obvious because I had to class-dump CoreData.framework to find some hidden _setReadOnly method in NSManagedObject. Should I file a bug requesting better documentation for this?

Florent

_______________________________________________

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 reserved property names?
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: NSCollectionViewItem & Its View
  • Next by Date: Re: Comparing NSColor instances
  • Previous by thread: Re: [ANN] NSOperation/NSOperationQueue tutorial
  • Next by thread: Re: Core Data reserved property names?
  • Index(es):
    • Date
    • Thread