Re: Persistent Stores and Packages ...
Re: Persistent Stores and Packages ...
- Subject: Re: Persistent Stores and Packages ...
- From: SA Dev <email@hidden>
- Date: Mon, 23 May 2005 14:17:47 -0400
On May 23, 2005, at 1:41 PM, mmalcolm crawford wrote:
"You can customize the architecture of the persistence stack by
overriding the methods managedObjectModel and
configurePersistentStoreCoordinator:forURL:ofType:error:. You might
wish to do this, for example, to specify a particular managed
object model, or to distribute storage of different entities among
different file stores within a file wrapper."
I did manage to find this very passage just a few minutes ago. I
modified the URL's file path to append /ProjectData.xml to the
package path then return the result of calling super's
configurePersistentStoreCoordinator:forURL:ofType:error ... which
resulted in an error: "The document "Untitled" could not be saved as
"Test 1.myext". Invalid file name.
Oddly, the original URL's absoluteString was: /Users/
me/.TemporaryItems/folders.501/TemporaryItems/com.me.myapp/Test 1.myext
My appended path components made it: /Users/me/.TemporaryItems/
folders.501/TemporaryItems/com.me.myapp_8671_138564409_1/Test 1.myext/
ProjectData.xml
Inspecting the path "/Users/me/.TemporaryItems/folders.501/
TemporaryItems/com.me.myapp_8671_138564409_1/" doesn't exist.
So simply modifying the URL passed in this method doesn't work. It
appears I have to actually create the temporary folder (and possibly
the persistent store) first. Is this true?
I also just looked at the "managedObjectModel" but I don't see
from the docs how this applies to changing the load/save path of the
persistent store. The model is in the main app's bundle and won't be
loaded from any other location. If I'm missing something, I'd
appreciate a nudge.
Again start with
configurePersistentStoreCoordinator:forURL:ofType:error: -- see
also <http://developer.apple.com/documentation/Cocoa/Conceptual/
NSPersistentDocumentTutorial/index.html>
Done and done ... and done again. I've read this front to back
exactly five times now in the last few weeks in an attempt at first
to understand Core Data, then to answer specific questions to which
that document pertains. Sadly, if it contains information on this
specific problem, I have yet to understand how. It's likely that
there's some key concept or term with which I should be familiar that
a more experienced developer might take for granted ... hint, hint. ;-)
Just another nudge, please? I'm on the right track, evidently, and
I'd happily google the rest if I only knew what I should be googling
for.
_______________________________________________
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