mybatis-generator-gui
mybatis-generator-gui copied to clipboard
这个工具如何避免text类型的字段生成withBlob这个bean
如题,这个工具如何避免text类型的字段生成withBlob这个bean,为什么有这个想法呢,如下: 比如表名叫User,表里包含text类型的字段;就会附带生成UserWithBlobs这个bean 默认的MyBatisBaseDao中会有List<Model> selectByExampleWithBLOBs(E example);这个方法,但是在默认生成的UserDao中,却是这么写public interface UserlDAO extends MyBatisBaseDao<User, String, UserExample> ,传入的Model的类型是User,而不是UserWithBlobs,这就导致了父类MyBatisBaseDao的selectByExampleWithBLOBs方法完全不能用,返回的List<Model>,实际是List<User>,这就完全拿不到UserWithBlobs里边的字段。考虑着手动改的话,类太多了,业务需求吧,有几十个上百个这样的含有text的字段,所以手动不现实
mapper.selectByExampleWithBLOBs(example); 这样查询可以?