From ff496ad2d3dae92ce6b1938ad11987722b4bb43c Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Wed, 30 Aug 2017 07:42:25 +0200 Subject: [PATCH] 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) --- .../server/type/EnumToDbIntegerMap.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/io/ebeaninternal/server/type/EnumToDbIntegerMap.java b/src/main/java/io/ebeaninternal/server/type/EnumToDbIntegerMap.java index 6f8b20dd6..94a7b28dd 100644 --- a/src/main/java/io/ebeaninternal/server/type/EnumToDbIntegerMap.java +++ b/src/main/java/io/ebeaninternal/server/type/EnumToDbIntegerMap.java @@ -14,6 +14,19 @@ public class EnumToDbIntegerMap extends EnumToDbValueMap { 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); }