jpamybatisspring-mybatismybatis-generator

mybatis avoid generating model class *WithBLOBs


I have to change a column from varchar2 to clob. After generation mybatis creates a *WithBlobs class with fields that extends the original class. To avoid several impacts it would be possible to avoid the creation of the *WithBlobs class ?

Is there a configuration in MyBatis GeneratorXML Configuration File Reference that allows this ?


Solution

  • You can set the default model type to "flat" in your configuration. With that setting, only a single model class will be generated that contains all fields.

    <generatorConfiguration>
      <context defaultModelType="flat">
        ...
      <context>
    </generatorConfiguration>