diff --git a/KeyValueObjectMapping/DCAttributeSetter.m b/KeyValueObjectMapping/DCAttributeSetter.m index faedfa7..6f0f990 100644 --- a/KeyValueObjectMapping/DCAttributeSetter.m +++ b/KeyValueObjectMapping/DCAttributeSetter.m @@ -21,6 +21,8 @@ + (void)assingValue:(id)value forAttributeName: (NSString *)attributeName andAtt if(([value isKindOfClass:[NSNull class]] || value == nil) && attributeClass == [NSString class]){ [object setValue:nil forKey:attributeName]; + }else if(([value isKindOfClass:[NSNull class]] || value == nil) && attributeClass == nil) { + [object setValue:@0 forKey:attributeName]; }else { @try { [object setValue:value forKey:attributeName];