FIX: EnumToDbIntegerMap did not set 'integerType' - this leads to an incompatible quoting. Constraints like "check in ('1','2','3')" were not accepted by hsqldb on integer columns. (#1088)

This commit is contained in:
Roland Praml
2017-08-30 17:42:25 +12:00
committed by Rob Bygrave
parent 24d438ba23
commit ff496ad2d3
@@ -14,6 +14,19 @@ public class EnumToDbIntegerMap extends EnumToDbValueMap<Integer> {
return Types.INTEGER;
}
/**
* Construct with allowNulls defaulting to false and integerType=true
*/
public EnumToDbIntegerMap() {
this(true);
}
/**
* Construct with integerType=true
*/
public EnumToDbIntegerMap(boolean allowNulls) {
super(allowNulls, true);
}
public void add(Object beanValue, Integer dbValue, String name) {
addInternal(beanValue, dbValue, name);
}