Re: Copy managed object between contexts?
Re: Copy managed object between contexts?
- Subject: Re: Copy managed object between contexts?
- From: Colin Cornaby <email@hidden>
- Date: Sun, 14 Aug 2005 22:10:46 -0700
Of course. The object is relationship free, and not in any committed
relationships with any other objects, so this shouldn't be a problem. :)
On Aug 13, 2005, at 6:19 PM, Chris Hanson wrote:
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
---------------------------
Colin Cornaby
Lead Programmer, ProToys
Macintosh Specialist - University of Portland - htttp://up.edu
_______________________________________________
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