Skip to content

updateByPrimaryKeySelective 会更新主键,报错 #119

@ebaecff

Description

@ebaecff

报错如下:

  ### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: modifying the partition value of rows is not allowed
  ### The error may exist in ItemMapper.java (best guess)
  ### The error may involve ItemMapper.updateByPrimaryKeySelective-Inline
  ### The error occurred while setting parameters
  ### SQL: UPDATE yahoo_items  SET  update_time = ?,   data_id = ? WHERE data_id = ?
  ### Cause: org.postgresql.util.PSQLException: ERROR: modifying the partition value of rows is not allowed

主键是这样配置的

    @Entity.Column(id = true, updatable = false)
    private String dataId;

应该如何配置调用 updateByPrimaryKeySelective 时把主键排除掉。
版本:
mybatisMapperVersion = "2.2.5"
mybatisSpringBootVersion = "3.0.4"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions