On Feb 12, 2010, at 2:05 PM, Roland King wrote: > 1) does this uuid need to be something you generate externally and then set > onto the object? Each core data object already has an objectID which is > guaranteed unique in the database, can you make use of that one instead? You > are allowed to keep that and use it to find objects later.
no, unfortunatly uuid is a string generated externally and set onto newly created object. > 2) Where does the uuid on the object you are inserting come from? If you are > setting a UUID on the objects when you are creating them then using one of > the uuid_generate functions the UUID generated can be 'reasonably considered > unique amongst all UUIDs created on the local system, and among UUIDs created > on other systems in the past and in the future' (from the manpage). If you > generate them in such a way, you don't have to care about checking them to be > unique, they already will be. can I generete an unique UUID from my string and take care if it's unique? (something like an hash function?) The program works in this way: it downloads messages from network; each message contains this unique string identifier; i need to create a new object for coredata, check if another object is on storage with the same id, if not I'll put it into storage._______________________________________________ Cocoa-dev mailing list ([email protected]) 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]
