Zepo / GYDataCenter

An alternative to Core Data for people who like using SQLite directly.
MIT License
842 stars 132 forks source link

relationshipSetterNames中capitalizedString的使用问题 #13

Closed chenhong closed 8 years ago

chenhong commented 8 years ago
+ (NSDictionary *)relationshipSetterNames {
...
            if (type == GYPropertyTypeRelationship) {
                [(NSMutableDictionary *)result setObject:property forKey:[NSString stringWithFormat:@"set%@:", [property capitalizedString]]];
            }
...
}

[property capitalizedString]这句有问题,会把第一个字母转为大写其余字母转为小写,比如‘originalData’这样的属性转成了‘Originaldata’,导致[[self relationshipSetterNames] objectForKey:NSStringFromSelector(aSEL)]时找不到,aSEL是setOriginalData:

Zepo commented 8 years ago

最新代码已解决。