[#5154] Add support for mapping Record1<String> to Enum by Enum.valueOf() in DefaultRecordMapper

This commit is contained in:
lukaseder 2016-03-17 11:00:48 +01:00
parent c15c171404
commit 81076997cb

View File

@ -286,8 +286,11 @@ public class DefaultRecordMapper<R extends Record, E> implements RecordMapper<R,
return;
}
// [#3212] "Value types" can be mapped from single-field Record1 types for convenience
if (type.isPrimitive() || DefaultDataType.types().contains(type)) {
// [#3212] [#5154] "Value types" can be mapped from single-field Record1
// types for convenience
if (type.isPrimitive()
|| DefaultDataType.types().contains(type)
|| Enum.class.isAssignableFrom(type)) {
delegate = new ValueTypeMapper();
return;
}