Mybatis | update 时报错 Can not update sharding key

分片的列必须在 where 条件里,并且同更新的值相同;或者将该列设置为 null。因为分表键不能修改,如果改了的话,数据所在库表的位置会变,这是不符合预期的。

参考:【已解决】ShardingSphere 使用记录,ShardingException: Can not update sharding key, logic table: [user_log]解决-腾讯云开发者社区-腾讯云

你可能感兴趣的:(工作实践记录,数据库,mybatis)