聂秋秋 5 éve
szülő
commit
b71fd259bd

+ 13 - 0
mybatis-plus-core/src/test/java/com/baomidou/mybatisplus/core/metadata/TableInfoHelperTest.java

@@ -49,6 +49,16 @@ class TableInfoHelperTest {
         private String name;
         private String name;
     }
     }
 
 
+    @Data
+    @EqualsAndHashCode(callSuper = true)
+    @TableName(excludeProperty = {"test", "id"})
+    private static class ModelFour extends BaseModel {
+
+        private String sex;
+
+        private String name;
+    }
+
 
 
     @Test
     @Test
     void testIsExistTableId() {
     void testIsExistTableId() {
@@ -61,5 +71,8 @@ class TableInfoHelperTest {
         TableInfo tableInfo = TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""), ModelThree.class);
         TableInfo tableInfo = TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""), ModelThree.class);
         Assertions.assertEquals(tableInfo.getFieldList().size(), 2);
         Assertions.assertEquals(tableInfo.getFieldList().size(), 2);
         tableInfo.getFieldList().forEach(field -> Assertions.assertNotEquals("test", field.getProperty()));
         tableInfo.getFieldList().forEach(field -> Assertions.assertNotEquals("test", field.getProperty()));
+        tableInfo = TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""), ModelFour.class);
+        Assertions.assertEquals(tableInfo.getFieldList().size(), 2);
+        tableInfo.getFieldList().forEach(field -> Assertions.assertNotEquals("test", field.getProperty()));
     }
     }
 }
 }