解决updateByPrimaryKeySelective()因为对象数据是null而更新失败

解决:Could not set parameters for mapping: ParameterMapping

遇到这个问题 需要去model类中确定一下主键id 找到 自己实体类中的主键加上@Id
或者在生成代码得时候在数据库编辑添加主键

  • 步骤一
  • 解决updateByPrimaryKeySelective()因为对象数据是null而更新失败_主键

  • 步骤二

解决updateByPrimaryKeySelective()因为对象数据是null而更新失败_数据库_02


希望能帮到你