"Automatic" Auditing

#1

Any ideas around how I could do "automatic" auditing of changes to objects? (An equivalent to Hibernate's Envers) Thanks. Michael.

#2

You may try the following:

  • Define the entity class with a composite primary key [id, revision].
  • Never delete entity objects - alway update an object by persisting it again with [id, max-revision + 1].
  • Add another indexed boolean field that indicates if an entity object is old or new.
  • Adjust your queries to use that field.

In addition, you may be interested in voting / subscribing to this feature request.

 

ObjectDB Support

Reply