Re: Deleting all objects from Core Data store
Re: Deleting all objects from Core Data store
- Subject: Re: Deleting all objects from Core Data store
- From: "Devraj Mukherjee" <email@hidden>
- Date: Mon, 14 Jan 2008 22:11:24 +1100
Hi Marcelo,
Yeah for statement is definately something I can live with since its a
small data set. What predicate should I use to create a set of all the
objects?
On Jan 14, 2008 9:35 PM, <email@hidden> wrote:
> >Part of my CoreData application requires to delete all objects of a
> >specific set. I am able to find objects using a Predicate and delete a
> >singular object. How do I go about deleting all objects from a set?
>
> Using a for statement ? There's no "DELETE FROM", because Core Data isn't a relational database.
>
> If you have a lot of objects to delete in the set, refactor your model to add a object to hold the set (with a cascade rule) and when required, delete it.
>
>
> :: marcelo.alves
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden