• 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: Copy managed object between contexts?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy managed object between contexts?


  • Subject: Re: Copy managed object between contexts?
  • From: Jim Correia <email@hidden>
  • Date: Sat, 13 Aug 2005 21:43:35 -0400

On Aug 13, 2005, at 9: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 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.

Indeed. I have a generic attribute copying method in my code (different from what I posted since it allows filtering of copied attributes through a shouldCopyAttribute: method), but I have no generic relationship copier. I've found the need to copy relationships rare, and when I do, it is always a special case.


Jim
_______________________________________________
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


References: 
 >Copy managed object between contexts? (From: Colin Cornaby <email@hidden>)
 >Re: Copy managed object between contexts? (From: mmalcolm crawford <email@hidden>)
 >Re: Copy managed object between contexts? (From: Colin Cornaby <email@hidden>)
 >Re: Copy managed object between contexts? (From: mmalcolm crawford <email@hidden>)
 >Re: Copy managed object between contexts? (From: Colin Cornaby <email@hidden>)
 >Re: Copy managed object between contexts? (From: Jim Correia <email@hidden>)
 >Re: Copy managed object between contexts? (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Copy managed object between contexts?
  • Next by Date: attributed string in nsoutlineview
  • Previous by thread: Re: Copy managed object between contexts?
  • Next by thread: Re: Copy managed object between contexts?
  • Index(es):
    • Date
    • Thread