Master data error "Invalid job: in the Compound Indexes attribute ... is not a valid property" after adding and removing indexes

I played with compound indices for one of my entities. I added 2 (I just clicked the add button twice) and immediately deleted them (by clicking the delete button). Now when I create, I get an error message:

Unconfigured entity: in the Compound Indexes attribute for an Entity object is not a valid property.

I already tried:

  • Delete received data
  • Cleaning project
  • Xcode closure
  • Removing an application from a simulator

Recreating the corresponding Entity classes and repeating the above

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

EDIT : I finally reverted to the previous version, but I still would like to know what went wrong.

+4
source share
6 answers

I was able to edit the .xcdatamodeld / .xcdatamodel / contents (XML) file directly using a text editor to remove the index tag on the processed object.

This seemed to solve the problem.

+6
source

In Xcode 6, as I decided, it was select "Project"> "Clean build folder ..." (the menu item was changed from "Clear" while holding down the "Option" key).

Then close and restart Xcode.

+2
source

Not quite the answer, I think the @smw method is good (cleaning may also be necessary) But today, June 11, 2015, since Apple is announcing iOS9 and the new music streaming service, this stupid error is still not fixed (xCode 6.3). More than 3 years ... Do they really use CoreData ?: D

+2
source

I had the same problem. Xcode seems to be bug.

I had to return the file <app>.xcdatamodeld/<app>.xcdatamodel/contents to last-known-good state in order to solve it.

+1
source

I had the same problem. I fixed it by cleaning up by removing the dir assembly in the project directory and deleting the corresponding DerirData dir in ~ / Library / Developer / Xcode / DerivedData. Definitely looks like an Xcode error.

I previously had a pointer to an attribute that I deleted, but it seemed to support the index, even if the user interface in Xcode showed that it disappeared. The content file under the data model also disappeared.

+1
source

You can avoid this by deleting any composite indexes that reference this attribute before deleting the attribute itself.

If any of your composite indexes refers to a single attribute, consider using an β€œindexed” property in an attribute as opposed to a composite index list β€” this way, when you remove an attribute, the index will be deleted automatically.

+1
source

Source: https://habr.com/ru/post/1445064/


All Articles