From 455feea5f7ec2a115da2d2bd59730a597ae60a84 Mon Sep 17 00:00:00 2001 From: zhijieqing <443712+hezhijie@user.noreply.gitee.com> Date: Sun, 27 Aug 2023 15:54:24 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AE=9E=E4=BD=93=E7=B1=BB?= =?UTF-8?q?=E5=9C=A8=E4=B8=8D=E5=90=8C=E5=8C=85=E5=90=8D=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=9D=E5=A7=8B=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhijieqing <443712+hezhijie@user.noreply.gitee.com> --- .../src/main/java/com/mybatisflex/core/table/TableDefs.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableDefs.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableDefs.java index ade0b9b1..afd73b75 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableDefs.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/table/TableDefs.java @@ -53,7 +53,7 @@ public class TableDefs implements Serializable { public static TableDef getTableDef(Class entityClass, String tableNameWithSchema) { - if (TABLE_DEF_MAP.isEmpty()) { + if (!TABLE_DEF_MAP.containsKey(tableNameWithSchema)) { init(entityClass.getPackage().getName()); } return TABLE_DEF_MAP.get(tableNameWithSchema); @@ -61,7 +61,7 @@ public class TableDefs implements Serializable { public static QueryColumn getQueryColumn(Class entityClass, String tableNameWithSchema, String column) { - if (TABLE_DEF_MAP.isEmpty()) { + if (!TABLE_DEF_MAP.containsKey(tableNameWithSchema)) { init(entityClass.getPackage().getName()); } Map queryColumnMap = QUERY_COLUMN_MAP.get(tableNameWithSchema);