• 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: Core Data Questions--Relationships, UUIDs, and Dirty States
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Core Data Questions--Relationships, UUIDs, and Dirty States (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Finding out that a volume is going away before it does
  • Next by Date: Re: How to check the number of pending events in the application event queue?
  • Previous by thread: Re: Core Data Questions--Relationships, UUIDs, and Dirty States
  • Next by thread: Looking for the big hammer
  • Index(es):
    • Date
    • Thread