When none of the solutions worked for me, I deleted the existing
NSManagedObject and created a new one. If you need any code from the previous object remember to take a backup, and later copy that into the new NSManagedObject class.
Hope this helps someone.