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;