![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SSH
iteye_16431
这个作者很懒,什么都没留下…
展开
-
Hibernate乐观锁实现之Version
本文转载自http://esffor.iteye.com/blog/168243 通过在表中及POJO中增加一个version字段来表示记录的版本,来达到多用户同时更改一条数据的冲突 数据库脚本: create table studentVersion (id varchar(32),name varchar(32),ver int); POJO package Ver...原创 2014-03-19 08:57:31 · 257 阅读 · 0 评论 -
Hibernate乐观锁实现之Timestamp
本文转载自http://esffor.iteye.com/blog/168242 通过在表中及POJO中增加一个Timestamp字段来表示记录的最后更新时间,来达到多用户同时更改一条数据的冲突,这个timestamp由数据库自动添加,无需人工干预 数据库结构: create table studentTimestamp(id varchar(32),name varchar...原创 2014-03-19 09:00:53 · 153 阅读 · 0 评论