> You could issue a fetch request at startup, store its @max in some
> ivar in a MOC subclass, and use that instead of the local static
> variable.
>
> Still a pain, but might do you what you want.

I happen to have needed autoincrement properties too, and stumbled upon this post by David Emme:

http://lists.apple.com/archives/Cocoa-dev/2006/Jul/msg01801.html

I implemented something simular, I like the solution of storing the "next" value in the metadata. Works fine for me since the app I'm working on is the only one fiddling with its data.

--
Florent Pillet                        http://www.florentpillet.com
Software consultant - Mobile devices, desktop and server platforms
Mac OS X, Windows+Mobile, Palm OS    Skype callto://florent.pillet
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to