我知道我可以做到:
[managedObject setValue:val forKey:@"key"];
但是如何将对象添加到多关系 nsorderedset 中?我有一种感觉,我不能只是:
NSOrderedSet * set = [managedObject objectForKey:@"therelationship"];
[set addObject:relationshipObj];
[managedObject setValue:set forKey:@"therelationship"];
或者我可以吗?