Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
- Subject: Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
- From: Joshua Preston <email@hidden>
- Date: Thu, 6 Mar 2008 17:32:59 -0500
Chris,
The short answer is for quick look ups. My application creates a new
managed object which represents a new "issue". When the person done
with the entry completes it, they should be issued a "tracking
number". For reasons ubiquitous with telephone support, I am
attempting to only utilize numeric values. So for example, I create a
new ticket, I should be able to look it up by a human readable index
using very low tech means--think telephone keypad...
Now I won't claim to be the expert on this subject, but it did seem to
me that the indexes (keys) created by core data would probably not use
a simple integer for key look ups, or allow me to specify a range of
valid numbers. I mean, for ease of use, I was going to start my range
in the millions to keep a consistent length of the "reference id".
Regards,
Joshua Preston
email@hidden
On Mar 6, 2008, at 4:56 PM, Chris Hanson wrote:
On Mar 6, 2008, at 1:05 PM, Joshua Preston wrote:
I am however having problems finding information regarding auto
incremented attributes, namely an NSNumber attribute.
What do you want to do with this? Core Data manages primary &
foreign keys for you via object IDs and relationships, so you don't
have to do anything with those yourself. (And those are the typical
uses of auto-incrementing fields or sequences.)
-- Chris
_______________________________________________
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