Core Data and Document Packages
Core Data and Document Packages
- Subject: Core Data and Document Packages
- From: Seth Willits <email@hidden>
- Date: Tue, 3 Jul 2007 01:38:33 -0700
Aloha,
I'm taking the plunge and switching a fair chunk of code to using
Core Data instead of my own management of an SQLite database. At
least that's the current plan. ;)
My document-based app has a document type which uses a package
instead of just a single file to store data in, because there is a
need to store related files inside the package as well. Currently I'm
doing some relatively simple overloading of standard NSDocument
methods to open and save the database by using a path based off of
the -fileName.
With NSPersistentDocument, by default it uses the document's -
fileName as the path for the persistent store. What is the best way
to retarget it so that it uses a different path within the package? I
imagine someone here must have done it, so I'm hoping to not have to
fiddle for so long to figure it out, however it seems that I might
simply be able to override
configurePersistentStoreCoordinatorForURL:ofType:error: and pass a
different URL to super's implementation? Will there be any side
effects to this?
Thanks. Total Core Data newb,
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden