Re: CoreData - how to write new kind of PersistentStore?
Re: CoreData - how to write new kind of PersistentStore?
- Subject: Re: CoreData - how to write new kind of PersistentStore?
- From: Bill Bumgarner <email@hidden>
- Date: Sat, 30 Apr 2005 01:01:22 -0700
On Apr 30, 2005, at 12:44 AM, Todd Blanchard wrote:
It would appear from the docs that the protocol for PersistentStore
itself is undocumented and that there is no api on
NSPersistentStoreCoordinator for registering new kinds of
PersistentStores.
Is this simply a case of the docs lagging the code, or is CoreData
pointlessly limited in this way? Having the ability to add new
PersistentStores would be the key to allowing the use of CoreData
with legacy file formats.
Core Data 1.0 does not include a public persistent store API. To
convert a legacy file format is mostly a matter of reading that
format and converting the read data into a managed object graph.
If you want read/write access to a legacy file format, the in memory
store is quite useful for this task. The managed object context and
persistent store coordinator contain all of the methods necessary to
receive notification of all changes to an object graph and to react
when the graph is saved to the memory store. At that moment in
time, writing to a legacy file format is a matter of walking the in-
memory object graph and writing the legacy format.
b.bum
_______________________________________________
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