apache / apache/incubator-seata

主键更新为原值报错:Sorry, update pk value is not supported!

Open
#3,289 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

### Ⅰ. Issue Description
tkmabatis 使用 updateByPrimaryKeySelective() 会根据主键更新非空字段,update table set id=id,set xx=xx where id =?, 主键修改为原值报错:Sorry, update pk value is not supported!

### Ⅱ. Describe what happened
从1.2 更新到 1.4 的时候报错

If there is an exception, please attach the exception trace:

Just paste your stack trace here!
```

### Ⅲ. Describe what you expected to happen

### Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. xxx
2. xxx
3. xxx

### Ⅴ. Anything else we need to know?

### Ⅵ. Environment:

- JDK version :
- OS :
- Others:

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the tk.mybatis updateByPrimaryKeySelective() case described in the issue, comparing Seata 1.2 and 1.4. Trace the generated update table set id=id statement and the source of "Sorry, update pk value is not supported!"; done means updating a primary key to its existing value no longer fails, with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.