• 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: NSManagedObjectContext<NSCoding> ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSManagedObjectContext<NSCoding> ?


  • Subject: Re: NSManagedObjectContext<NSCoding> ?
  • From: Matthew Firlik <email@hidden>
  • Date: Mon, 15 May 2006 01:48:21 -0700


On May 15, 2006, at 12:21 AM, Aurélien Hugelé wrote:

On 12 mai 06, at 16:40, Jim Correia wrote:

Is there any documentation which discusses the details of archiving/ unarchiving managed object contexts (with a possible example of where this would be useful)?

What properties of the managed object context survive the round trip through the archiving/unarchiving process? (It appears that the basic properties are round trip, but the unarchived instances is a clean slate with no PSC.)

NSManagedObject are not <NSCoding> compliant. I can add than "automatic" (i mean implemented by Apple in NSManagedObject machinery) archiving of NSManagedObject has no sense since it would probably result in the whole object graph archiving....
Of course you can make your specific NSManagedObject subclass <NSCoding> compliant... but keep in mind that archiving properties is very easy, archiving/dearchiving relationships is not !


may i ask why you would need archiving, since CoreData is already a object persistence oriented framework ?

Jim was asking (specifically) about NSManagedObjectContext, not NSManagedObject; one could imagine wanting to archive out the current working state of an application, allowing users to come back to a set of (unsaved) changes later. However, as Jim notes above, at this time the coding support for the context only stores the basic properties with which it was configured -- being:


	- the staleness interval
	- the merge policy
	- if the context is retaining registered objects
	- if the context is propagating deletes

No information about registered objects (inserted, updated, or deleted) would be part of the archived content.

- matthew


_______________________________________________ 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: 
 >NSManagedObjectContext<NSCoding> ? (From: Jim Correia <email@hidden>)
 >Re: NSManagedObjectContext<NSCoding> ? (From: Aurélien Hugelé <email@hidden>)

  • Prev by Date: Re: Using Fix and Continue with Object Alloc
  • Next by Date: Re: how do I save prefs when the app is Force Quit?
  • Previous by thread: Re: NSManagedObjectContext<NSCoding> ?
  • Next by thread: setHidden Category
  • Index(es):
    • Date
    • Thread