提交 3cffe4b7 authored 作者: 宋勇's avatar 宋勇

修改jdbc 主键bug

上级 116694d1
...@@ -172,9 +172,10 @@ public class AccessJdbcDataSourceChannel implements DataSourceChannelExt { ...@@ -172,9 +172,10 @@ public class AccessJdbcDataSourceChannel implements DataSourceChannelExt {
TableField tableField = new TableField(); TableField tableField = new TableField();
String columnName = resultSet.getString("COLUMN_NAME"); String columnName = resultSet.getString("COLUMN_NAME");
tableField.setPrimaryKey(false); tableField.setPrimaryKey(false);
// if (StringUtils.isNotBlank(primaryKey) && primaryKey.equals(columnName)) { // if (StringUtils.isNotBlank(primaryKey) &&
// tableField.setPrimaryKey(true); // primaryKey.equals(columnName)) {
// } // tableField.setPrimaryKey(true);
// }
tableField.setType(resultSet.getString("TYPE_NAME")); tableField.setType(resultSet.getString("TYPE_NAME"));
if (typeList.contains(tableField.getType().toLowerCase())) { if (typeList.contains(tableField.getType().toLowerCase())) {
if (tableField.getType().toLowerCase().indexOf("text") < 0) { if (tableField.getType().toLowerCase().indexOf("text") < 0) {
......
...@@ -180,9 +180,10 @@ public class DamengJdbcDataSourceChannel implements DataSourceChannelExt { ...@@ -180,9 +180,10 @@ public class DamengJdbcDataSourceChannel implements DataSourceChannelExt {
String columnName = resultSet.getString("NAME"); String columnName = resultSet.getString("NAME");
tableField.setPrimaryKey(false); tableField.setPrimaryKey(false);
// if (StringUtils.isNotBlank(primaryKey) && primaryKey.equals(columnName)) { // if (StringUtils.isNotBlank(primaryKey) &&
// tableField.setPrimaryKey(true); // primaryKey.equals(columnName)) {
// } // tableField.setPrimaryKey(true);
// }
tableField.setType(resultSet.getString("TYPE$")); tableField.setType(resultSet.getString("TYPE$"));
if (typeList.contains(tableField.getType().toLowerCase())) { if (typeList.contains(tableField.getType().toLowerCase())) {
if (tableField.getType().toLowerCase().indexOf("text") < 0) { if (tableField.getType().toLowerCase().indexOf("text") < 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论