I have an iPad app that uses Core Data with Sqlite. I keep getting errors when a save is called on the managedobjectcontext. The error is sql error (19) constraint fails. I found a few websites that lead me to modify my generation code and update the Z_MAX field in the table Z_PRIMARYKEY table. Are there any other things that Core Data does behind the scenes similar to this?
Note: Yes, I know I shouldn’t be doing this but part of the problem is the core data database is over 5 MB and it takes a long time to process the data from a plist. (Maybe JSON would be faster?)
EDIT I just noticed Z_ENT which is the entity id. I have to add that into the generation as well.
EDIT 2 Go the Entities mapped but I’m still getting the error. It is having trouble doing deletes and updates even through it appears to be valid.
Appeared to just be an issue with the app itself.