在具有相同修订版本的 SVN 文件中,一起提交可以具有明确的含义,这些含义经常在提交消息中提到,例如,可以将某些类添加到具有相同修订版本号的项目中以添加特定功能。
但是在 hibernate 审核中我不明白修订意味着什么?我问这个问题是因为 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 中它们将是实体)。然后,您可以通过修订来审核实体。
关于java - 使用 envers 进行 hibernate 审计时修订的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36985066/