Core Data attributes and reserved names...
Core Data attributes and reserved names...
- Subject: Core Data attributes and reserved names...
- From: Greg Stark <email@hidden>
- Date: Fri, 18 Aug 2006 21:55:15 -0600
I learned something unexpected about Core Data and thought I'd share
it...
As you may know, when graphically creating a data model in Xcode,
Xcode does a good job of telling you whether an attribute name that
you want to use is reserved (e.g., if you try to use the attribute
name "zone", Xcode will let you know you're not allowed to use that
name). However, there is at least one reserved name that isn't
flagged as a problem, and that name is "version".
If you happen to name one of your attributes "version", as I
unfortunately did, you'll have a lot of fun and excitement tracking
down why your application is crashing -- especially if you're new to
Cocoa as I am.
What makes things even more confusing is that when you make the above
mistake, you can save your Core Data-based document as binary or xml
store (seemingly without problem, I might add), but you can't save it
as a SQL store (you'll get [NSCFNumber length]: selector not
recognized errors...).
Anyway, I hope this note helps others avoid this problem.
-Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden