diff --git a/APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server/AbstractSQLConfig.java b/APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server/AbstractSQLConfig.java index 9be2743c1..df637c14e 100755 --- a/APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server/AbstractSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONORM/src/main/java/zuo/biao/apijson/server/AbstractSQLConfig.java @@ -1862,6 +1862,8 @@ public String getJoinString() throws Exception { if (joinList != null) { String quote = getQuote(); + List pvl = new ArrayList<>(); + boolean changed = false; String sql = null; SQLConfig jc; @@ -1898,7 +1900,10 @@ public String getJoinString() throws Exception { + quote + tn + quote + "." + quote + j.getTargetKey() + quote; jc.setMain(false).setKeyPrefix(true); - preparedValueList.addAll(jc.getPreparedValueList()); +// preparedValueList.addAll(jc.getPreparedValueList()); + + pvl.addAll(jc.getPreparedValueList()); + changed = true; break; case "": // FULL JOIN @@ -1916,6 +1921,13 @@ public String getJoinString() throws Exception { joinOns += " \n " + sql; } + + + if (changed) { + pvl.addAll(preparedValueList); + preparedValueList = pvl; + } + } return joinOns;