aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/iciql/TableDefinition.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/iciql/TableDefinition.java')
-rw-r--r--src/com/iciql/TableDefinition.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/iciql/TableDefinition.java b/src/com/iciql/TableDefinition.java
index f0ee4fa..f506484 100644
--- a/src/com/iciql/TableDefinition.java
+++ b/src/com/iciql/TableDefinition.java
@@ -293,6 +293,7 @@ class TableDefinition<T> {
// configure Java -> SQL enum mapping
if (f.getType().isEnum()) {
+ enumType = EnumType.DEFAULT_TYPE;
if (f.getType().isAnnotationPresent(IQEnum.class)) {
// enum definition is annotated for all instances
IQEnum iqenum = f.getType().getAnnotation(IQEnum.class);
@@ -343,7 +344,7 @@ class TableDefinition<T> {
// convert enumeration to INT or STRING
Enum<?> iqenum = (Enum<?>) value;
switch (field.enumType) {
- case STRING:
+ case NAME:
if (field.trimString && field.maxLength > 0) {
if (iqenum.name().length() > field.maxLength) {
return iqenum.name().substring(0, field.maxLength);