Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions BWObjectMapping/BWObjectValueMapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ - (void)setValue:(id)value
withValueBlock:attributeMapping.valueBlock
fromObject:object];
}


#ifdef _COREDATADEFINES_H
if ([object isKindOfClass:NSClassFromString(@"NSManagedObject")]) {
transformedValue = [self transformValue:transformedValue forKeyPath:keyPath withCoreDataObject:object];
}
#endif

if ([transformedValue isKindOfClass:[NSArray class]]) {
transformedValue = [self transformArrayValue:transformedValue forKeyPath:keyPath withObject:object];
Expand Down Expand Up @@ -113,7 +115,7 @@ - (id)transformArrayValue:(id)value forKeyPath:(NSString *)keyPath withObject:(i
return nil;
}


#ifdef _COREDATADEFINES_H
////////////////////////////////////////////////////////////////////////////////////////////////////
- (id)transformValue:(id)value forKeyPath:(NSString *)keyPath withCoreDataObject:(NSManagedObject *)object {
if (nil == value) {
Expand Down Expand Up @@ -178,7 +180,7 @@ - (id)transformValue:(id)value forKeyPath:(NSString *)keyPath withCoreDataObject

return transformedValue;
}

#endif

////////////////////////////////////////////////////////////////////////////////////////////////////
- (id)transformValue:(id)value withValueBlock:(BWObjectMappingValueBlock)valueBlock fromObject:(id)object {
Expand Down