• 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: Shawn Erickson <email@hidden>
  • Date: Wed, 15 Nov 2006 17:56:48 -0800


On Nov 15, 2006, at 4:44 PM, Pierre Chatelier wrote:

This implies that you are fully loading all objects of entity kind "CachedFeatures" from the persistent store (loading from disk) to just go an delete them since you are using executeFetchRequest:error:. You are not utilizing any cache for this fetch (but you are getting the cache populated). This is likely unneeded overhead.
Exactly ! And I want to avoid this overhead. I began this thread of discussion to know if there was a way to tell a persistent store (or a managed object context) to remove objects without fetching them.

Not knowing how your data model... I wonder why you are executing a fetch?


Do you have a top level managed object that has a one-to-many relationship with "CachedFeatures" entity?

If you do then it could be as simple as iterating over the collection that you could get form such a top level object instead of fetching that collection from the persistent store. The former shouldn't trigger faulting (again not knowing what relationship and delete semantics CacheFeatures has).

If you don't have such an object... why don't you? :)

-Shawn
_______________________________________________
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>)
 >Re: CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>)
 >Re: CoreData, reset a persistent store (From: "Marcus S. Zarra" <email@hidden>)
 >Re: CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>)
 >Re: CoreData, reset a persistent store (From: "I. Savant" <email@hidden>)
 >Re: CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>)
 >Re: CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>)
 >Re: Re: CoreData, reset a persistent store (From: "Shawn Erickson" <email@hidden>)
 >Re: CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>)

  • Prev by Date: Re: device path from mount path?
  • Next by Date: NSTextField & Hidden Binding Problem
  • Previous by thread: Re: CoreData, reset a persistent store
  • Next by thread: Re: CoreData, reset a persistent store
  • Index(es):
    • Date
    • Thread