mybatis-mapper / mapper

MyBatis Mapper
https://mapper.mybatis.io
Apache License 2.0
326 stars 48 forks source link

实体类继承公共父类,使用selectByExample报错 #11

Closed mytianya closed 2 years ago

mytianya commented 2 years ago

SysDictItemDO集成了BaseEntity,当使用Example方法时会应为找不到BaseEntity上面的类注解时报错 image 使用BaseEntity上面的delFlag字段查询 image 使用报错 image

mytianya commented 2 years ago

这种方式有继承BaseEntity的方式是不是不能使用Example了,有其他方式使用了嘛?

abel533 commented 2 years ago

这算是bug,暂时可以通过给BaseEntity添加注解实现。

目前考虑给 Example 类似的用法中,指定实体类 entityClass。

abel533 commented 2 years ago

最新发布的1.0.3版本已解决该问题,不需要对父类进行任何处理。