diff --git a/src/main/java/apijson/framework/APIJSONVerifier.java b/src/main/java/apijson/framework/APIJSONVerifier.java index 02d1ee0..1a7643f 100755 --- a/src/main/java/apijson/framework/APIJSONVerifier.java +++ b/src/main/java/apijson/framework/APIJSONVerifier.java @@ -188,6 +188,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON Map> newMap = new LinkedHashMap<>(); Map> fakeDeleteMap = new LinkedHashMap<>(); Map newTKMap = new LinkedHashMap<>(); + Map tableSchemaMap = new LinkedHashMap<>(); SortedMap>> versionedTableColumnMap = new TreeMap<>(ColumnUtil.DESC_COMPARATOR); SortedMap>> versionedKeyColumnMap = new TreeMap<>(ColumnUtil.DESC_COMPARATOR); @@ -208,6 +209,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON String name = item.getString("name"); String alias = item.getString("alias"); + String schema = item.getString("schema"); Map fakemap = new HashMap<>(); String deletedKey = item.getString(AbstractSQLConfig.KEY_DELETED_KEY); @@ -251,6 +253,7 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON newMap.put(alias, map); fakeDeleteMap.put(alias, fakemap); newTKMap.put(alias, name); + tableSchemaMap.put(alias, schema); if (ENABLE_VERIFY_COLUMN) { JSONObject columns = item.getJSONObject("columns"); @@ -313,10 +316,12 @@ public static JSONObject initAccess(boolean shutdownWhenServerError, APIJSON ACCESS_MAP = newMap; ACCESS_FAKE_DELETE_MAP = fakeDeleteMap; APIJSONSQLConfig.TABLE_KEY_MAP = newTKMap; + APIJSONSQLConfig.TABLE_SCHEMA_MAP = tableSchemaMap; } else { ACCESS_MAP.putAll(newMap); ACCESS_FAKE_DELETE_MAP.putAll(fakeDeleteMap); APIJSONSQLConfig.TABLE_KEY_MAP.putAll(newTKMap); + APIJSONSQLConfig.TABLE_SCHEMA_MAP = tableSchemaMap; } if (ENABLE_VERIFY_COLUMN) {