Exception thrown in NSOrderedSet generated accessors

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

On my Lion app, I have this data model:

\"enter

The relationship subitem

25条回答
  •  难免孤独
    2020-11-22 09:31

    The Apple docs To Many Relations says: you should access the proxy mutable set or ordered set using

    NSMutableOrderedSet * set = [managedObject mutableOrderedSetValueForKey:@"toManyRelation"];
    

    Modifying this set will add or remove relations to your managed object. Accessing the mutable ordered set using the accessor whether with [ ] or . notation is wrong and will fail.

提交回复
热议问题