数据库表里面存在text或者blob字段。逆向工程自动生成的MyBatis的xml中会多出几个以withBlobs结尾的方法和resultMap

此时查询数据或者更新数据的使用仍然使用selectByPrimaryKey或者updateByPrimaryKey,得到的text或者blob数据是null。

解决办法:

应该使用selectByExampleWithBLOBs或者updateByExampleWithBLOBs这两个方法。

 

使用text或者blob字段 要单独定义 resultMap     继承 原来的resultMap

<resultMap extends="BaseResultMap" />
</resultMap>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-30
  • 2022-01-11
  • 2023-03-30
  • 2022-12-23
  • 2021-09-14
  • 2021-09-14
  • 1970-01-01
相关资源
相似解决方案