Re: Core Data Questions--Relationships, UUIDs, and Dirty States
Re: Core Data Questions--Relationships, UUIDs, and Dirty States
- Subject: Re: Core Data Questions--Relationships, UUIDs, and Dirty States
- From: chaitanya pandit <email@hidden>
- Date: Tue, 28 Oct 2008 11:33:07 +0530
On 28-Oct-08, at 2:01 AM, Keary Suska wrote:
1. Confirmation clarification: do I understand correctly,
considering typical RDBMS data integrity rules, that for most to-one
relationships, I would set the delete rule to "no action", since
deletion of the "many" item should not effect the "one" item?
2. How do I best implement custom UUIDs for relationships (as a
property to an entity)? I thought I saw this come up some time ago
but I can't seem to find the discussion.
You can generate an UUID by:
+ (NSString *)generateUniqueID
{
CFUUIDRef uuid = CFUUIDCreate(NULL);
NSString *identifier = (NSString *)CFUUIDCreateString(NULL, uuid);
CFRelease(uuid);
return identifier;
}
I guess what you wanna do is store this string as a property to an
entity.
3. How can I, in a bindings-compliant manner, report the "dirty"
state of an NSManagedObjectContext? I know I can be notified when
the context has changed, and when the context has saved, but what
about when the context has been rolled back or changes undo-ed?
4. Does anyone have recommendations on how I can maintain the
"dirty" state of a single NSManagedObject? I don't figure there is
anything built into CD for this.
TIA,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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
_______________________________________________
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