JaVers, query state of object at point in time X

149 views Asked by At

Is it possible to easily query the state of an object from the JaVers repository as shadow/snapshot at a given time X?

Use case: We have been logging changes to employee data with JaVers for 3 years. Now we would like a list of all employees who worked in the accounting department on 01.08.2019.

1

There are 1 answers

0
Bartek Walacik On BEST ANSWER

There is no such queries, Javers stores snapshots of objects and a snapshot is saved when you change an object. So all you can do is to query for objects changed in a given period:

QueryBuilder.byClass(Employee).from(...).to(...)