File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -228,17 +228,17 @@ public String getSchema() {
228228 return schema ;
229229 }
230230 public String getSQLSchema (String sqlTable ) {
231+ //强制,避免因为全局默认的 @schema 自动填充进来,导致这几个类的 schema 为 sys 等其它值
232+ if ((Table .TABLE_NAME .equals (sqlTable ) || Column .TABLE_NAME .equals (sqlTable )) ) {
233+ return SCHEMA_INFORMATION ;
234+ }
235+ if ((PgAttribute .TABLE_NAME .equals (sqlTable ) || PgClass .TABLE_NAME .equals (sqlTable )) ) {
236+ return "" ;
237+ }
238+
231239 String sch = getSchema ();
232240 if (sch == null ) { //PostgreSQL 的 pg_class 和 pg_attribute 表好像不属于任何 Schema StringUtil.isEmpty(sch, true)) {
233- if ((Table .TABLE_NAME .equals (sqlTable ) || Column .TABLE_NAME .equals (sqlTable )) ) {
234- sch = SCHEMA_INFORMATION ;
235- }
236- else if ((PgAttribute .TABLE_NAME .equals (sqlTable ) || PgClass .TABLE_NAME .equals (sqlTable )) ) {
237- sch = "" ;
238- }
239- else {
240- sch = DEFAULT_SCHEMA ;
241- }
241+ sch = DEFAULT_SCHEMA ;
242242 }
243243 return sch ;
244244 }
You can’t perform that action at this time.
0 commit comments