• 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: Validating unique objects in CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validating unique objects in CoreData


  • Subject: Re: Validating unique objects in CoreData
  • From: "Sean McBride" <email@hidden>
  • Date: Sat, 13 Feb 2010 19:32:15 -0500

Roland King (email@hidden) on 2010-02-13 22:06 said:

>That's not a horrible solution, except for the feeling that core data
>ought to let you do what you want without having to implement your own
>UUID cache.

I have found it useful, on many occasions, to add a 'uuid' attribute to
many of my Core Data entities.  I set it in awakeFromInsert.  I have
found NSManagedObject's objectID method largely useless since, as the
docs say, "if the receiver has not yet been saved, the object ID is a
temporary value that will change when the object is saved".  I guess
that could be acceptable in some situations, but in a document-based
app, it's the user that decides when saving happens.  I have also found
it odd that Core Data behaves like this, but I guess there is some SQL/
database reason for it all...

Sean

--
"None are more hopelessly enslaved than those who falsely believe they
are free." - Goethe

_______________________________________________

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

  • Follow-Ups:
    • Re: Validating unique objects in CoreData
      • From: Chris Hanson <email@hidden>
References: 
 >Validating unique objects in CoreData (From: malcom <email@hidden>)
 >Re: Validating unique objects in CoreData (From: Roland King <email@hidden>)
 >Re: Validating unique objects in CoreData (From: "Sean McBride" <email@hidden>)
 >Re: Validating unique objects in CoreData (From: malcom <email@hidden>)
 >Re: Validating unique objects in CoreData (From: Roland King <email@hidden>)

  • Prev by Date: Re: Validating unique objects in CoreData
  • Next by Date: Re: How to get small UISegmentedControl?
  • Previous by thread: Re: Validating unique objects in CoreData
  • Next by thread: Re: Validating unique objects in CoreData
  • Index(es):
    • Date
    • Thread