Skip to content

支持对CoreData关系的映射和序列化,支持对映射和序列化的单独配置#337

Open
luhui wants to merge 8 commits into
CoderMJLee:masterfrom
luhui:CoreDataSupport
Open

支持对CoreData关系的映射和序列化,支持对映射和序列化的单独配置#337
luhui wants to merge 8 commits into
CoderMJLee:masterfrom
luhui:CoreDataSupport

Conversation

@luhui
Copy link
Copy Markdown

@luhui luhui commented Feb 17, 2016

mj_setKeyValue:方法里,可变处理的转化好像没有发现在哪里用到,这个处理有什么意义吗?

// 不可变 -> 可变处理
            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];
            }
@wolfcon
Copy link
Copy Markdown
Collaborator

wolfcon commented May 8, 2019

请将白名单黑名单和 CoreData 扩展的功能分功能 PR . 不要混在一起

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants