@@ -902,6 +902,29 @@ static void ModelSetValueForProperty(__unsafe_unretained id model,
902902 for (id one in valueArr) {
903903 if ([one isKindOfClass: meta->_genericCls]) {
904904 [objectArr addObject: one];
905+ } else if (meta->_genericCls == [NSString class ]) {
906+ if ([one isKindOfClass: [NSNumber class ]]) {
907+ [objectArr addObject: ((NSNumber *)one).stringValue];
908+ }
909+ } else if (meta->_genericCls == [NSMutableString class ]) {
910+ if ([one isKindOfClass: [NSString class ]]) {
911+ [objectArr addObject: ((NSString *)one).mutableCopy];
912+ } else if ([one isKindOfClass: [NSNumber class ]]) {
913+ [objectArr addObject: ((NSNumber *)one).stringValue.mutableCopy];
914+ }
915+ } else if (meta->_genericCls == [NSNumber class ]) {
916+ [objectArr addObject: YYNSNumberCreateFromID (one)];
917+ } else if (meta->_genericCls == [NSURL class ]) {
918+ if ([one isKindOfClass: [NSURL class ]]) {
919+ [objectArr addObject: [NSURL URLWithString: one]];
920+ } else if ([one isKindOfClass: [NSString class ]]) {
921+ NSCharacterSet *set = [NSCharacterSet whitespaceAndNewlineCharacterSet ];
922+ NSString *str = [one stringByTrimmingCharactersInSet: set];
923+ if (str.length == 0 ) {
924+ } else {
925+ [objectArr addObject: [[NSURL alloc ] initWithString: str]];
926+ }
927+ }
905928 } else if ([one isKindOfClass: [NSDictionary class ]]) {
906929 Class cls = meta->_genericCls ;
907930 if (meta->_hasCustomClassFromDictionary ) {
0 commit comments