Re: CoreData - multiple stores advice...
Re: CoreData - multiple stores advice...
- Subject: Re: CoreData - multiple stores advice...
- From: William Turner <email@hidden>
- Date: Fri, 25 Jan 2008 08:17:35 -0800
Hi Martin,
The real question is whether the entities in your separate stores are
connected by relationships. If so, then you have to implement cross-
store relationships. You should probably start with the iClass
example, in /Developer/Examples/CoreData. This shows an approach for
implementing cross-store relationships. The main thing to keep in mind
is that Core Data doesn't support this out-of-the-box, you definitely
have to do a little work, and there are caveats... But, iClass should
get you started.
Wil
On Jan 25, 2008, at 4:34 AM, Martin Linklater wrote:
Apologies if this has been covered before, but I've delved into the
archives and I'm still not sure about a few Q's I have.
My application will have multiple SQLite stores. One that ships with
the application and is read only, and there will be othersr which
contains user generated data. I understand you can access these all
through the same MOC, but I'm unsure how to set up the MOMs and
NSPersistentStoreCoordinator underneath them. What is the best
method ?
Do I need multiple MOM's - one for each store ?
Do I need multiple NSPersistentStoreCoordinators - one for each
store ?
I've also read that setting up NSPersistentStores and
NSPersistentStoreCoordinators can take 'options' NSDictionaries - is
there a complete list of these options in the docs anywhere ?
Also, when I add a persistent store to my coordinator with
'addPersistentStoreWithType:' it seems to delete the store if it is
already there - is there a differentiation between creating a new
empty store and simply attaching to a store that already exists ?
What part of the API specifies this ?
Any source or hyperlinks you could include with your answers would
be appreciated.
Thank you for your help.
- Martin
_______________________________________________
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
_______________________________________________
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