Exception thrown in NSOrderedSet generated accessors

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

On my Lion app, I have this data model:

\"enter

The relationship subitem

25条回答
  •  清歌不尽
    2020-11-22 09:23

    Personally I have just replaced the calls to the CoreData generated methods with direct calls to the method as outlined in another solution by @Stephan:

    NSMutableOrderedSet* tempSet = [self mutableOrderedSetValueForKey:@"subitems"];
          [tempSet addObject:value];
    [tempSet addObject:value];
    

    This removes the need for categories that might later conflict with a solution from Apple to the generated code when the bug is fixed.

    This has the added plus of being the official way to do it!

提交回复
热议问题