Disabling Javers audit over a collection's elements while auditing the collection itself

37 views Asked by At

I'm using Javers for versioning and keeping the audit trail for my MongoDB entities. I've come across a situation where my Document has a field of List type. Javers is keeping a snapshot of each individual element within the list and thus the findShadows exectues a subsequent query for each List element which is slowing down the entire shadow fetch.

Can I disable the audit over each individual element while still keeping track of changes over the List field itself.

Eg :

Class Employee {
   private String name;
   private Double age;
   private List<Task> tasks;
   ....
}

Class Task {
   private String taskName;
   private String taskDescription;
   private String taskId;
   .....
}

Now while auditing Employee object I want to track if any change is made to tasks field (whole list being updated) but disable auditing over each element of tasks (change in taskDescription for Employee), how do I achieve this ?

I have tried using @DiffIgnore but it ignores the entire List field. I want to ignore auditing on each task object withing the tasks list

0

There are 0 answers