Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coredata 联合使用问题 #378

Closed
ghost opened this issue Apr 18, 2016 · 1 comment
Closed

Coredata 联合使用问题 #378

ghost opened this issue Apr 18, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 18, 2016

coredata 建立了两个entity entity1 包含entity2 由于core data里边包含关系 是用NSSet 集合 所以用您这个解析的时候失败了
// 不可变 -> 可变处理
if (propertyClass == [NSMutableArray class] && [value isKindOfClass:[NSArray class]]) {
value = [NSMutableArray arrayWithArray:value];
} else if (propertyClass == [NSMutableDictionary class] && [value isKindOfClass:[NSDictionary class]]) {
value = [NSMutableDictionary dictionaryWithDictionary:value];
} else if (propertyClass == [NSMutableString class] && [value isKindOfClass:[NSString class]]) {
value = [NSMutableString stringWithString:value];
} else if (propertyClass == [NSMutableData class] && [value isKindOfClass:[NSData class]]) {
value = [NSMutableData dataWithData:value];
}
是不是你这里需要加一个NSSet的呢

@wolfcon
Copy link
Collaborator

wolfcon commented Sep 8, 2021

Duplicate of #43

@wolfcon wolfcon marked this as a duplicate of #43 Sep 8, 2021
@wolfcon wolfcon closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant