"Detaching" a managed object.
"Detaching" a managed object.
- Subject: "Detaching" a managed object.
- From: Jeff LaMarche <email@hidden>
- Date: Mon, 12 Dec 2005 21:36:17 -0500
I'm dredging my brain for some old data here, so bear with me if my
recollection is flawed.
Using EOF, I seem to remember that there was a way to detach an
entity from the context, which (among other things) would allow you
to make a copy of of the entity didn't get stored in the database.
You could use this, for example, to cache an entity so you could
later restore the data.
Does Core Data have a similar functionality? Right now, I'm copying
the fields I want to cache into an NSDictionary, and it seems like
more code than I should be writing, but I'm concerned that if I copy
the NSManagedObject, it will create a copy in that NSManagedObject's
context or give me a shallow copy that will change if the original
changes.
Is there a way to make a deep copy of an NSManagedObject that doesn't
exist in a context? Or is there another way to handle what I'm doing
other than copying the attribute values to a dictionary (which
somehow feels dirty :) )
Thanks,
Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden