I have a customer entity that contains a "customer number"
attribute. I want this attribute to be automatically generated when
a customer is inserted into the database (SQLite). In other words,
I want the customer number attribute to auto-increment.
I just had the same issue. I basically compute the "next" autonum and
store it as metadata in my persistent store. If there's not one
already stored (only happens once), I compute the "next" one based on
the max currently in the database.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden