提交 b144a815 authored 作者: Thomas Mueller's avatar Thomas Mueller

JaQu: The data type VARCHAR is now (again) used for Strings (no longer TEXT,…

JaQu: The data type VARCHAR is now (again) used for Strings (no longer TEXT, except when explicitly set).
上级 b92aa748
......@@ -117,12 +117,8 @@ public class ModelUtils {
*/
static String getDataType(FieldDefinition fieldDef, boolean strictTypeMapping) {
Class<?> fieldClass = fieldDef.field.getType();
if (SUPPORTED_TYPES.containsKey(fieldClass)) {
String type = SUPPORTED_TYPES.get(fieldClass);
if (type.equals("VARCHAR") && fieldDef.maxLength <= 0) {
// unspecified length strings are TEXT, not VARCHAR
return "TEXT";
}
String type = SUPPORTED_TYPES.get(fieldClass);
if (type != null) {
return type;
}
if (!strictTypeMapping) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论