• 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: Deleting all objects from Core Data store
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting all objects from Core Data store


  • Subject: Re: Deleting all objects from Core Data store
  • From: email@hidden
  • Date: Mon, 14 Jan 2008 02:35:05 -0800

>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

  • Follow-Ups:
    • Re: Deleting all objects from Core Data store
      • From: "Devraj Mukherjee" <email@hidden>
References: 
 >Deleting all objects from Core Data store (From: "Devraj Mukherjee" <email@hidden>)

  • Prev by Date: Deleting all objects from Core Data store
  • Next by Date: Re:designing beyond MV and (one) C
  • Previous by thread: Deleting all objects from Core Data store
  • Next by thread: Re: Deleting all objects from Core Data store
  • Index(es):
    • Date
    • Thread