From 9507abb95f1b818fe614baa6c1478766fd71b7bb Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Sat, 10 Jun 2023 23:51:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20QueryCondition=20=E6=B7=B1=E5=BA=A6?= =?UTF-8?q?=E5=85=8B=E9=9A=86=E6=8C=87=E5=90=91=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mybatisflex/core/query/QueryCondition.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryCondition.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryCondition.java index da293ab1..edda0617 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryCondition.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/query/QueryCondition.java @@ -306,8 +306,8 @@ public class QueryCondition implements CloneSupport { clone.column = ObjectUtil.clone(this.column); clone.value = ObjectUtil.cloneObject(this.value); clone.before = clone.next = null; - for (QueryCondition x = next; x != null; x = x.next) { - clone.next = x.clone(); + if (this.next != null) { + clone.next = this.next.clone(); clone.next.before = clone; } return clone;