Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Data error 'Misconfigured Enity: In the Compound Indexes attribute...is not a valid property' after adding and then removing indexes

I was playing around with compound indexes for one of my entities. I added 2 (I simply clicked the 'add' button twice) and removed them right away (by clicking the remove button). Now when I build, I receive the error:

Misconfigured Entity: In the Compound Indexes attribute for entity Entity, is not a valid property.

I have already tried:

  1. Deleting derived data
  2. Cleaning project
  3. Closing Xcode
  4. Deleting app from simulator

Recreating the corresponding Entity classes and repeating the above

but the error persists. Any ideas on how to resolve this?

EDIT: I finally rolled things back to a previous version, but I would still love to know what went wrong.

like image 372
cmac Avatar asked Dec 12 '22 20:12

cmac


1 Answers

I was able to edit the .xcdatamodeld/.xcdatamodel/contents file (XML) directly with a text editor to remove the indexes tag on the effected entity.

This seemed to resolve the problem.

like image 110
smw Avatar answered May 19 '23 04:05

smw