0
我在NSManagedObject上使用一個類別,名爲NSManagedObject + Serialization.h,位於這裏https://gist.github.com/nuthatch/5607405。序列化NSManagedObject
一切都非常好,但我需要實現這一點,但不知道如何?我想跳過一些對象。
- (NSDictionary*) toDictionary {
// Check to see there are any objects that should be skipped in the traversal.
// This method can be optionally implemented by NSManagedObject subclasses.
NSMutableSet *traversedObjects = nil;
if ([self respondsToSelector:@selector(serializationObjectsToSkip)]) {
traversedObjects = [self performSelector:@selector(serializationObjectsToSkip)];
}
return [self toDictionaryWithTraversalHistory:traversedObjects];
}
如何添加對象關係要跳過?
非常感謝
謝謝!完美地工作! – ourmanflint