From fefc4cb9e36b69c819dbc2a2763149d2108a4318 Mon Sep 17 00:00:00 2001 From: ostrichManX <159116925+ostrichManX@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:28:14 +0800 Subject: [PATCH] Update AbstractSQLConfig.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决oracle in中的子查询会带上分页的bug --- APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java b/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java index bfb3b1e1..f5ac342f 100755 --- a/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java +++ b/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java @@ -4587,6 +4587,9 @@ public boolean isWithAsEnable() { */ protected String getOraclePageSql(String sql) { int count = getCount(); + if (count <= 0 || RequestMethod.isHeadMethod(getMethod(), true)) { // TODO HEAD 真的不需要 LIMIT ? + return sql; + } int offset = getOffset(getPage(), count); String alias = getAliasWithQuote();