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