I am developing an iOS application and i am using CoreData to persiste my data. The application is like iBooks, we can download a book, read a book, takes notes in the book,… and for this i have many entities in CoreData (NoteEntity,….).
Now i have a functionality witch is removing a book downloaded by the user ( the user can download many books and there are a functionality to delete a book ( to have spaces for example)). My question is, is there a simple way to remove all the objects in CoreData ( all the objects corresponding to the book deleted by the user) Thanks for your answers.
I am developing an iOS application and i am using CoreData to persiste my
Share
Create a “Cascade” delete relationship between the book and all objects associated with it.
From Core Data programming guide: