Exception thrown in NSOrderedSet generated accessors

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

On my Lion app, I have this data model:

\"enter

The relationship subitem

25条回答
  •  伪装坚强ぢ
    2020-11-22 09:30

    Yes, this is definitely a Core Data bug. I wrote up an ObjC-Runtime-based fix a while back, but at the time I figured it would be fixed soon. Anyway, no such luck, so I posted it up on GitHub as KCOrderedAccessorFix. Work around the problem on all your entities:

    [managedObjectModel kc_generateOrderedSetAccessors];
    

    One entity in particular:

    [managedObjectModel kc_generateOrderedSetAccessorsForEntity:entity];
    

    Or just for one relationship:

    [managedObjectModel kc_generateOrderedSetAccessorsForRelationship:relationship];
    

提交回复
热议问题