我有一个结果数组,其中包含从核心数据中获取的结果。它是一个字典数组(根据 NSDictionaryResultType)。
我获取的对象是一辆汽车,汽车有名称、制造商、型号、颜色(我可以在数组中看到所有这些)。但是 car 也有 toCarParts 关系。此 NSSet 包含 carPart 对象(车轮、轮胎等...)
我如何访问它(它在字典中有错误吗?)
最佳答案
- (void)setPropertiesToFetch:(NSArray *)values 的文档状态:
The property descriptions may represent attributes, to-one relationships, or expressions.
因此无法获得与 NSDictionaryResultType
的一对多关系的 NSSet
。
关于ios - 从 NSDictionaryResultType 获取关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14265716/