JaVers 用户,
我试图了解 JaVers 比较的基础知识,但无法弄清楚!
我创建了一个非常基本的 MyObject 类,如下所示:
public class MyObject {
@Id
private int id;
private String name;
private String remark;
public MyObject() {
id=-1;
name = "";
remark = "";
}
public MyObject(int id)
{
this.id = id;
name = "";
remark = "";
}
public MyObject(int id, String name, String remark) {
this.id = id;
this.name = name;
this.remark = remark;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
我创建了两个 MyObject 之类的:
MyObject firsto = new MyObject(1);
MyObject secondo = new MyObject(2);
接下来我做一个:
Diff diff = javers.compare(firsto,secondo);
System.out.println(diff);
输出如下所示:
Diff:
1. NewObject{globalId:'mypackage.MyObject/2'}
2. ObjectRemoved{globalId:'mypackage.MyObject/1'}
我的问题是这个输出中 ObjectRemoved 的确切含义是什么?无法找到任何有关此的文档,抱歉!
问候,杰拉德