• 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
"Detaching" a managed object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"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
  • Follow-Ups:
    • Re: "Detaching" a managed object.
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: Ignore hide messages sent to my application?
  • Next by Date: Re: Dynamically loading my code into other apps
  • Previous by thread: Re: Dynamically loading my code into other apps
  • Next by thread: Re: "Detaching" a managed object.
  • Index(es):
    • Date
    • Thread