EMF Teneo: Auditing it All!
One feature missing from Teneo (until now!) was auditing, storing object state over time and allowing you to retrieve the historical state of objects. The past weeks I worked on this nice feature and currently all/most 500 Teneo testcases are run in audit mode.
The auditing functionality provides some nice functionality:
- auditing can be enabled/disabled for the complete model or for specific types
- possible to navigate/iterate over the history of an object
- possible to query for version history using HQL
Teneo auditing generates an audit model from the domain model and creates separate tables to store the audit information. All/most Ecore model constructs are supported.
There are several options available to control the auditing behavior. In addition you can annotate the domain model with JPA annotations to control the auditing database schema. This is all described in some more detail here.
Teneo provides different ways to get to the audited data, you can retrieve the audit history for a single object, use HQL querying or iterate over the history.
I am now working on integrating Teneo auditing with the CDO Hibernate Store. Allowing the user to retrieve revisons through the CDO revision api. More on that in my next post!