Skip to content

Commit 54b6690

Browse files
解决多表join,生成的sql未按join参数顺序,乱序问题
1 parent ba280ca commit 54b6690

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

APIJSON-Java-Server/APIJSONORM/src/main/java/apijson/server/AbstractParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ private List<Join> onJoinParse(Object join, JSONObject request) throws Exception
937937
else if (join instanceof String) {
938938
String[] sArr = request == null || request.isEmpty() ? null : StringUtil.split((String) join);
939939
if (sArr != null && sArr.length > 0) {
940-
joinMap = new JSONObject();
940+
joinMap = new JSONObject(true); //注意:这里必须要保证join连接顺序,保证后边遍历是按照join参数的顺序生成的SQL
941941
for (int i = 0; i < sArr.length; i++) {
942942
joinMap.put(sArr[i], new JSONObject());
943943
}

0 commit comments

Comments
 (0)