Re: Validating unique objects in CoreData
Re: Validating unique objects in CoreData
- Subject: Re: Validating unique objects in CoreData
- From: "Sean McBride" <email@hidden>
- Date: Fri, 12 Feb 2010 12:07:34 -0500
- Organization: Rogue Research Inc.
On 2/12/10 9:05 PM, Roland King said:
>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
Or instead of those 'uuid_generate functions':
+ (NSString*)stringFromUUID
{
NSString* uuidStr = nil;
CFUUIDRef uuid = CFUUIDCreate (kCFAllocatorDefault);
if (uuid)
{
uuidStr = NSMakeCollectable (CFUUIDCreateString (kCFAllocatorDefault,
uuid));
CFRelease (uuid);
}
return uuidStr;
}
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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