Re: CoreData, reset a persistent store
Re: CoreData, reset a persistent store
- Subject: Re: CoreData, reset a persistent store
- From: Scott Stevenson <email@hidden>
- Date: Wed, 15 Nov 2006 19:26:33 -0800
On Nov 15, 2006, at 6:03 PM, Pierre Chatelier wrote:
If you don't have such an object... why don't you? :)
Because my persistent store is a big database. Sometimes I pick up
things in it; but when I want to delete its content, there is no
particular reason that *all* the content has been used in the
program ! So I have no external collection refering all the objects
of my database.
Maybe I'm misunderstanding either Shawn's question or your response,
but it seems like an easy way to delete the contents of the store is
to have all of the objects in the store point to a single object. A
giant to-many relationship.
Setup the delete rule so that when the "master" object is deleted, it
cascades to all of the other objects. I'm not sure if this would be
faster than fetching everything and deleting it, but it might be.
Worth trying.
- Scott
_______________________________________________
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
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>) |
| >Re: CoreData, reset a persistent store (From: Shawn Erickson <email@hidden>) |
| >Re: CoreData, reset a persistent store (From: Pierre Chatelier <email@hidden>) |