Jul 16, 2010

How envers can work for you

Recently, i was using envers as a quick method to perform logging for my application. I have some positive and negative thoughts at this method.

It works in the following way:
Advantages
  • Simple to implement transactional information.
  • Audit Reader to query the audit records to find entity at a particular revision
Disadvantages
  • Creates multiple Audit tables
  • Very hard to document function that has modified the entity
  • Need 2 Audit Reader queries to retrieve the before and after values
  • Need to query all entities when trying to find out which table each revision has impacted.

No comments: