可选的<timestamp>元素指明了表中包含时间戳数据。 这用来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当然, 有时候应用程序可能在其他方面使用时间戳。
<timestamp
column="timestamp_column"
name="propertyName"
access="field|property|ClassName"
unsaved-value="null|undefined"
source="vm|db"
generated="never|always"
node="element-name|@attribute-name|element/@attribute|."
/>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
注意,<timestamp> 和<version type="timestamp">是等价的。并且<timestamp source="db">和<version type="dbtimestamp">是等价的。
本文介绍了Hibernate中<timestamp>元素的作用及其配置选项。该元素用于表中的时间戳数据,支持乐观锁定并可作为版本控制的替代方案。
6985

被折叠的 条评论
为什么被折叠?



