Re: Copy managed object between contexts?
Re: Copy managed object between contexts?
- Subject: Re: Copy managed object between contexts?
- From: Chris Hanson <email@hidden>
- Date: Sat, 13 Aug 2005 18:19:09 -0700
On Aug 13, 2005, at 5:40 PM, Jim Correia wrote:
It is left as an exercise to the reader to do the same for
relationships.
I would be extremely careful about "copying" relationships from one
managed object to another. Sometimes a relationship represents
association and other times a relationship represents containment.
For example, if instance A is associated with instance B via a to-one
relationship with a to-one inverse relationship, instance CopyA
*cannot* also be associated with instance B. In such a case, you
probably won't want to try and copy the relationship at all.
On the other hand, if instance A "contains" instance B, you might
want to make instance CopyA "contain" instance CopyB.
For this reason I'd recommend against writing "generic" code to
"copy" relationships, and instead code carefully to be sure you get
exactly what you want in each specific situation.
-- Chris
_______________________________________________
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