浏览代码

Drop precision and length from SQL->Java type determination

tags/v1.6.0
James Moger 9 年前
父节点
当前提交
ac8eed79c2
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/main/java/com/iciql/ModelUtils.java

+ 4
- 0
src/main/java/com/iciql/ModelUtils.java 查看文件

@@ -189,6 +189,10 @@ class ModelUtils {
sqlType = sqlType.toUpperCase();
// XXX dropping "UNSIGNED" or parts like that could be trouble
sqlType = sqlType.split(" ")[0].trim();
if (sqlType.indexOf('(') > -1) {
// strip out length or precision
sqlType = sqlType.substring(0, sqlType.indexOf('('));
}

if (SQL_TYPES.containsKey(sqlType)) {
// convert the sqlType to a standard type

正在加载...
取消
保存