Exception thrown in NSOrderedSet generated accessors

后端 未结 25 2563
天涯浪人
天涯浪人 2020-11-22 09:07

On my Lion app, I have this data model:

\"enter

The relationship subitem

25条回答
  •  Happy的楠姐
    2020-11-22 09:33

    I found this question by googling for the error message, and just wanted to point out that I ran into this error in a slightly different way (not using ordered sets). This isn't quite an answer to the given question, but I'm posting it here just in case it is helpful to anyone else who stumbles across this question while searching.

    I was adding a new model version, and added some relationships to existing models, and defined the add*Object methods in the header file myself. When I tried to call them, I got the error above.

    After reviewing my models, I realized I had stupidly forgotten to check the "To-Many Relationship" checkbox.

    So if you're running into this and you're not using ordered sets, double check your model.

提交回复
热议问题