FROM : Bill Bumgarner
DATE : Sat Apr 30 10:01:22 2005
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
DATE : Sat Apr 30 10:01:22 2005
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
| Related mails | Author | Date |
|---|---|---|
| Todd Blanchard | Apr 30, 09:44 | |
| Bill Bumgarner | Apr 30, 10:01 |






Cocoa mail archive

