mybatis报错无法update数据

报错信息:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'null' in 'class com.feishu.commute.pojo.entity.ZzzHrOaQingJia'

        显示映射的某个属性名字为null,但是实际上只是这个属性的值为null,想对其进行update操作。

 

原因:

        使用 baseMapper.updateById()方法进行update操作,但是没有对该实体类设置主键ID属性,设置主键ID属性后,可以正常update。

posted @ 2024-07-08 19:38  yanhongwen  阅读(76)  评论(0)    收藏  举报