In my application, I am using XML Mapping Metadata as an alternative to annotation. It worked fine for all the JPA annotations so far.
However for Auditing, I am using Hibernate Envers. I am declaring
@Audited
@AuditTable("LOAN_APPLICANT_AUDIT")
The only problem is how to put these annotations in XML mapping metadata form.
There is a requirement that the user should specify the list of tables, which needs to be audited.
Plus he should be also able to configure the name of AUDIT tables according to his needs.
The last step is that the particular column names inside a table which needs to be audited should be configurable.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…