Secret Core Data Reserved Keywords
Somewhere there exists a list of words you shouldn’t assign as attributes within Core Data. I don’t know where that list is, and today I got bit by not knowing. I tried to use the word “deleted” as an attribute. No matter how hard I tried to set the “deleted” value and regardless of what I saw in the XML, querying “deleted” returned NO. Actually, that’s an interesting point. I was able to setValue: “deleted” but not “valueForKey:” it. Odd.
The other funny thing about this is that if you try to use the name “isDeleted”, Xcode squawks up and makes it clear that “isDeleted” is a no no. See image of squawking:
I settled on “isProfileDeleted”. Redundant, but it works a heck of a lot better now (reads and writes!). Why the “name clash” code in Xcode isn’t catching “deleted” I don’t know.
I did some searching and couldn’t find a list of reserved words. If you know of one, please share.


May 12th, 2006 at 9:00 am
I came across 2 blogs at the same time tripping over the same issues in core data. As I said in the comments of the other blog make sure that you file a bug report with Apple and hopefully they will make some changes to their documentation.
The other blog is:
http://www.brainplugins.com/blog/2006/05/03/core-data-forbidden-property-propiedad-prohibida-en-core-data/
Thanks
Luke
May 12th, 2006 at 9:04 am
I guess we are getting the same documentation “bug”
( http://www.brainplugins.com/blog/2006/05/03/core-data-forbidden-property-propiedad-prohibida-en-core-data )