• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using an auto incremented NSNumber as attribute in a NSManagedObject


  • Subject: Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
  • From: Florent Pillet <email@hidden>
  • Date: Fri, 07 Mar 2008 17:34:35 +0100

> 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 (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


References: 
 >Using an auto incremented NSNumber as attribute in a NSManagedObject (From: Joshua Preston <email@hidden>)
 >Re: Using an auto incremented NSNumber as attribute in a NSManagedObject (From: Chris Hanson <email@hidden>)
 >Re: Using an auto incremented NSNumber as attribute in a NSManagedObject (From: Joshua Preston <email@hidden>)
 >Re: Using an auto incremented NSNumber as attribute in a NSManagedObject (From: "Kyle Sluder" <email@hidden>)

  • Prev by Date: Binding Error (accessing value for key) - but works with debugging on
  • Next by Date: Re: GetMonitorFromWindow
  • Previous by thread: Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
  • Next by thread: Presumably iphone does Objective-C 2.0?
  • Index(es):
    • Date
    • Thread