Closed gdunkle closed 5 years ago
This change breaks the contract: the signature of the method says it returns an (NSDate *)
, so you can't return something else unless you change the signature, which has other problematic consequences.
Instead, you could do (in - (void)MR_setAttribute:(NSAttributeDescription *)attributeInfo withValueFromObject:(id)objectData
):
id value = [attributeInfo MR_valueForKeyPath:lookupKeyPath fromObjectData:objectData] ?: [objectData valueForKeyPath:lookupKeyPath];
But there is a bit more to consider, like who has priority, MR_shouldUseDefaultValueIfNoValuePresent
or MR_importValue:forKey:
.
Minor change to allow "Date" values that can't be parsed to continue on so that they can be handled by import functions.