Having created an entity, and run the app successfully, I realised I had missed something out of it. I added the new attribute and now get an error regarding different data models, unable to open, SIGABRT (to paraphrase, but I think you get the picture). How do I go about resetting the data model, or will I have to create a new entity? If the latter is true, it seems very inflexible as I have deleted all of the data I saved from within the app.
+1
A:
You need to migrate the data model. See Migration in the Core Data Programming Guide.
The basic problem is that your current store is formatted for the old model. It simply has no place for the new attribute. To keep the current data, you need to perform a migration. If you are just still in development and don't care about the data, you can just delete the SQL store and start over with the new model.
TechZen
2010-09-20 12:08:58
Thanks, that helps a lot. Yeah, it's still in development so wasn't an issue, but I'll look into migration if I ever need to update what I'm storing once the app is complete.
churchill614
2010-09-25 15:35:38