[#973] EnumType renders name() instead of getLiteral() in formatXXX() methods

This commit is contained in:
Lukas Eder 2011-12-04 13:48:52 +00:00
parent 98de6b1fc9
commit f2bb68b986

View File

@ -65,6 +65,7 @@ import org.jooq.ArrayRecord;
import org.jooq.Attachable;
import org.jooq.AttachableInternal;
import org.jooq.Configuration;
import org.jooq.EnumType;
import org.jooq.Field;
import org.jooq.FieldProvider;
import org.jooq.Record;
@ -1095,6 +1096,9 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
else if (value.getClass().isArray()) {
formatted = Arrays.asList((Object[]) value).toString();
}
else if (value instanceof EnumType) {
formatted = ((EnumType) value).getLiteral();
}
else {
formatted = value.toString();
}