Browse Source

REPORT-134415 【fr-fbp回归】hive平台和设计器 数据连接类型不一致

fbp/release
Destiny.Lin 2 months ago
parent
commit
91fde4f64f
  1. 11
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

11
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -173,14 +173,15 @@ public class JDBCDefPane extends JPanel {
urlTextField.setText(dus[i].getURL());
}
}
// 更改数据库类型后 数据库名称置空和之前逻辑保持一致
if (needRefresh) {
jdbcDatabase.setDatabase(StringUtils.EMPTY);
// 更改数据库类型后更新数据库名称
if (needRefresh || StringUtils.isEmpty(jdbcDatabase.getDatabase())) {
jdbcDatabase.setDatabase(dbTypeMap.getOrDefault(GeneralUtils.objectToString(dbtypeComboBox.getSelectedItem()), DefaultDatabaseType.OTHER.getType()));
}
jdbcDatabase.setDatabase(dbTypeMap.getOrDefault(GeneralUtils.objectToString(dbtypeComboBox.getSelectedItem()), DefaultDatabaseType.OTHER.getType()));
changePane(dbtypeComboBox.getSelectedItem());
JDBCConnectionDef.getInstance().setConnection((String) dbtypeComboBox.getSelectedItem(), jdbcDatabase);
DatabaseConnectionPane.JDBC.getAdvancedAttrPane().populate(jdbcDatabase);
needRefresh = true;
}
};
private HashBiMap<String, String> nameAndRepresent;
@ -414,6 +415,7 @@ public class JDBCDefPane extends JPanel {
DriverURLName[] dus = entry.getValue();
for (int i = 0, len = dus.length; i < len; i++) {
if (ComparatorUtils.equals(dus[i].getDriver(), jdbcDatabase.getDriver())) {
needRefresh = false;
this.dbtypeComboBox.setSelectedItem(entry.getKey());
out = true;
break;
@ -454,7 +456,6 @@ public class JDBCDefPane extends JPanel {
} else {
this.charSetComboBox.setSelectedItem(jdbcDatabase.getOriginalCharsetName());
}
needRefresh = false;
}
public JDBCDatabaseConnection update() {

Loading…
Cancel
Save