How do I update Core Data entities, what actions are needed? I have a Storewith one-to-many relationship to Product. When I do a change to the products, remove one or add, do I need to do anything then such as invoking some methods? Or do I just edit products and leave them alone and then they are saved to persistent store when the user quits the application? Is that the normal way?
How do I update Core Data entities, what actions are needed? I have a
Share
You have to save them to be persistant – see Managed Object Context in the Core Data Programming Guide from Apple:
so here is the code
You should save often and not only when exiting the app. See this answer: How often should I save to Core Data?
This depends on the delete rule you set in the entity in the core data model.