문제

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