I just started with CoreData yesterday, and I\'m going crazy :( I created a project that uses CoreData (ticked the box -use CoreData). Created the entities, and then created the
I had the same problem and I found a not-so-elegant solution. It seems that
[NSEntityDescription insertNewObjectForEntityForName:@"myEntity" inManagedObjectContext:myManagedObjectContext];
creates an old version of myEntity
that does not have the attributes of the most up-to-date version. So I changed the name of myEntity
in the old version of the model to myEntityOld
and I did not get the error any more.
I suspect that there is an elegant way to do the same thing in XCode by setting a property of NSManagedObject
or NSEntityDescription
.