質問

I am using nhibernate envers for auditing. creating a corrosponding audit table for each table in database.

Envers needs two fields mandatory: one version and another timestamp.

but version field is also needed in main table for optimistic concurrency.

lets say: TableA { id , version , name } then as per envers the audit table with have: { id, version, name, revision, revisionType }

the fields in audit table: version and revision would be exactly same, both contains the version of an entry.

If i remove the version field from main table, then optimistic concurrency will not work with nhibernate and for envers it is mandatory to specify a revision field.

how can i deal with this situation?

役に立ちましたか?

解決

The Envers version and the Optimistic Concurrency version fields are different things. You should probably rename one or the other, if these are the default names.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top