Skip to content

Commit

Permalink
更新乐观锁.
Browse files Browse the repository at this point in the history
  • Loading branch information
nieqiurong committed Jul 19, 2024
1 parent a6af732 commit 1297f58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/docs/plugins/optimistic-locker.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public class YourEntity {
- 支持的数据类型包括:`int`, `Integer`, `long`, `Long`, `Date`, `Timestamp`, `LocalDateTime`
- 对于整数类型,`newVersion``oldVersion + 1`
- `newVersion` 会自动回写到实体对象中。
- 仅支持 `updateById(id)``update(entity, wrapper)` 方法。
- 支持内置的 `updateById(entity)``update(entity, wrapper)`, `saveOrUpdate(entity)`, `insertOrUpdate(entity) (version >=3.5.7)` 方法。
- 自定义方法更新时如果满足内置参数的参数条件方式也会执行乐观锁逻辑,例如自定义`myUpate(entity)` 这个和 `updateById(entity)` 是等价的,会提取参数进行乐观锁填充,但更新实现需要自行处理。
-`update(entity, wrapper)` 方法中,`wrapper` 不能复用。

## 示例
Expand Down

0 comments on commit 1297f58

Please sign in to comment.