Re: CoreData, reset a persistent store
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