Simple problem, but for me, tough execution. I'm working solely on an app that is in alpha, but my testers need to have the most up-to-date database. I have a Core Data model with two entities: Clothing and ClothingRecord.
Clothing is a "static" model that has preloaded data (things like Hat, Shirt, Pants, etc) that will only change whenever I update the model.
ClothingRecord is user populated entity that has relationships with entity Clothing.
What I've just run into is that I want to change the data in Clothing. Not only change properties of Clothing (like change name from "Hat" to "Cap"), but I want to add and remove items as well.
I'm fairly new to Core Data so I used Ray Wenderlich's tutorial on how to preload data: http://www.raywenderlich.com/980/core-data-tutorial-how-to-preloadimport-existing-data
This worked great for the first time. I have a database up and running. Now, however, that I've changed it, I'm not sure how to properly update the Clothing entity. Do I traverse all objects and compare? Do I just add new things? I can't go and delete objects because of existing relationships, right?
Are there guides or tutorials on how to update a Core Data driven app with preloaded data? I would imagine that this is happens all of the time, but I can't find any solid resources on it.