Reputation: 706
I have a POJO as below
class Employee{
private int id;
private String name;
private String profession;
private int experince;
public Employee(int id, String name, String profession, int experience){
this.id = id;
this.name = name;
this.profession = profession;
this.experience = experience;
}
and i have two objects which i want to compare
Employee emp1 = new Employee(1, "John Doe", "Architect",10);
Employee emp2 = new Employee(2, "Michael", "Developer",10);
I compare both the objects and get changes as
Diff diff = javers.compare(emp1,emp2);
List<Change> changes = diff.getChanges();
With this, I get (id, name, profession) as changed properties with their respective left and right values.
Is there any way I can include "experience" also as part of the Changes with left and right values as same?
Upvotes: 0
Views: 878
Reputation: 3496
Short answer is no, the Changes view reports, well, changed things only. Maybe you need the Snapshots view or Shadows view?
see https://javers.org/documentation/jql-examples/#data-history-views
Upvotes: 3