hibernate auditing with envers 修订的意义

Meaning of revision in hibernate auditing with envers

SVN 文件中相同版本号一起提交的可以有明确的含义,经常在提交消息中提到,例如一些 类 可以添加到具有相同版本号的项目中以添加某个功能。

但是在hibernate auditing我不明白revision是什么意思?我问这个问题是因为 Envers 的 API 对修改非常方便,主要与他们一起工作。

文档 (http://docs.jboss.org/envers/docs/) 说:

Basically, one transaction is one revision (unless the transaction didn't modify any audited entities). As the revisions are global, having a revision number, you can query for various entities at that revision, retrieving a (partial) view of the database at that revision. You can find a revision number having a date, and the other way round, you can get the date at which a revision was commited.

所以你有相同的意义和行为。一个事务类似于对 SVN 的一次提交,您可以提交多个文件(在 Hibernate 中它们将是实体)。然后您可以按修订审核实体。