Re: configurePersistentStoreCoordinatorForURL:ofType: modelConfiguration: storeOptions:error
Re: configurePersistentStoreCoordinatorForURL:ofType: modelConfiguration: storeOptions:error
- Subject: Re: configurePersistentStoreCoordinatorForURL:ofType: modelConfiguration: storeOptions:error
- From: Jerry Krinock <email@hidden>
- Date: Wed, 30 Jun 2010 20:24:15 -0700
On 2010 Jun 30, at 16:42, Chris Idou wrote:
> According to the doco, the above method is used to "customise creation of the persistent store" especially with regards to the store type.
In my documentation, it's a little different: "Configures the receiver’s persistent store coordinator with the appropriate stores for a given URL."
> So I've been using the below code, which works perfectly fine for NSBinaryStoreType and NSXMLStoreType, but with NSSQLiteStoreType I get lots of merge errors when saving documents that I don't get if I completely remove the below code and let the framework handle it. Apparently I'm doing something subtlety wrong. Does anyone know what?
Not subtle. Apparently, adding a persistent store as you're doing is not sufficient to "configure" an sqlite store, whatever Apple means by that. I'm not surprised! Try invoking super. More specifically, since it appears that all you want to do is add a couple of key/value pairs to the store options, do an internet search for mmalc's MigratingDepartmentAndEmployees Sample Code and override that method like he does.
> At times like this I wish Apple would make their source code visible to developers.
That may have been helpful ten years ago (and the GNUStep source is still around). But in the case of Core Data, I suspect that taking time out to sift through Apple's source code would not be very productive :))
_______________________________________________
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