• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData, reset a persistent store
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CoreData, reset a persistent store
      • From: Pierre Chatelier <email@hidden>
References: 
 >CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>)

  • Prev by Date: Re: NSString comparison with locale single character error
  • Next by Date: Re: CoreData, reset a persistent store
  • Previous by thread: Reusing HTTP connections
  • Next by thread: Re: CoreData, reset a persistent store
  • Index(es):
    • Date
    • Thread