From 8464709afc035e71198f63d4e4d3704dc62be348 Mon Sep 17 00:00:00 2001 From: Ice Date: Mon, 15 Jan 2024 15:36:05 +0800 Subject: [PATCH] =?UTF-8?q?optimize=EF=BC=9ATableFactory=20Column=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=BF=BD=E7=95=A5@Relation=E7=9B=B8=E5=85=B3=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mybatisflex/core/table/TableInfoFactory.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java index 61712630..220f4b1b 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableInfoFactory.java @@ -266,6 +266,16 @@ public class TableInfoFactory { continue; } + //忽略 Relation 字段 + //fixed https://gitee.com/mybatis-flex/mybatis-flex/issues/I8SKOP + if (field.isAnnotationPresent(RelationOneToOne.class) + || field.isAnnotationPresent(RelationOneToMany.class) + || field.isAnnotationPresent(RelationManyToOne.class) + || field.isAnnotationPresent(RelationManyToMany.class)) + { + continue; + } + Column columnAnnotation = field.getAnnotation(Column.class); //满足以下 3 种情况,不支持该类型