Re: CoreData, reset a persistent store
Re: CoreData, reset a persistent store
- Subject: Re: CoreData, reset a persistent store
- From: Jim Correia <email@hidden>
- Date: Wed, 15 Nov 2006 22:01:27 -0500
On Nov 14, 2006, at 8:43 AM, Pierre Chatelier wrote:
I am wondering how to reset a persistent store used by a single
data model.
-A simple solution would be to fetch all objects and delete them;
this consumes much memory.
-I am not sure that deleting the file under the persistent store is
a good idea.
So at this point you really want to discard all the data in the store
(and don't care about any metadata in the store)?
Can you structure your application in such a way that at this point,
you tear down your persistence stack (persistent store coordinator,
managed object model, and any managed object contexts), remove the
file on disk, then bring the persistence stack back up?
Jim
_______________________________________________
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