From 5abc033d9d27809dbb22318d4157f0938428d0e8 Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Thu, 8 Jun 2023 15:10:34 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20Field=20Query=20=E5=8F=91?= =?UTF-8?q?=E7=94=9F=20TooManyResultsException"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2505feba12f56441d2f956b5c12048223bca72f5. --- .../src/main/java/com/mybatisflex/core/BaseMapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java index 9909fe48..d2ee7087 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/BaseMapper.java @@ -740,11 +740,11 @@ public interface BaseMapper { Class mappingType = fieldWrapper.getMappingType(); Object value; - if (Set.class.isAssignableFrom(fieldType)) { + if (fieldType.isAssignableFrom(List.class)) { + value = selectListByQueryAs(childQuery, mappingType); + } else if (fieldType.isAssignableFrom(Set.class)) { value = selectListByQueryAs(childQuery, mappingType); value = new HashSet<>((Collection) value); - } else if (Collection.class.isAssignableFrom(fieldType)) { - value = selectListByQueryAs(childQuery, mappingType); } else if (fieldType.isArray()) { value = selectListByQueryAs(childQuery, mappingType); value = ((List) value).toArray();