在我的Mysql DB中,我有审计表:
global_id_pk|local_id|fragment|type_name |owner_id_fk|
------------|--------|--------|--------------------------------------------------|-----------|
1|3014 | |de.cc.carorderprocess.models.Car | |
snapshot_pk|type |version|state |changed_properties |managed_type |global_id_fk|commit_fk|
-----------|-------|-------|------|-----------------------------------------------------|------------------------------------|------------|---------|
1|INITIAL| 1|......|.....................................................|de.cc.carorderprocess.models.Car | 1| 1|
5|UPDATE | 3|......|[¶ "modifyDate",¶ "nameCar"¶] |de.cc.carorderprocess.models.Car | 1| 3|
6|UPDATE | 4|......|[¶ "modifyDate",¶ "modelCar"¶] |de.cc.carorderprocess.models.Car | 1| 4|
但是当我在我的控制器中执行以下操作时:
Javers javers = JaversBuilder.javers().build();
QueryBuilder jqlQuery = QueryBuilder.byClass(Car.class);
List<CdoSnapshot> snapshots = javers.findSnapshots(jqlQuery.build());
logger.info(javers.getJsonConverter().toJson(snapshots));
Car car2 = carRepo.findById(3014l).get();
jqlQuery = QueryBuilder.byInstance(car2);
Changes changes = javers.findChanges(jqlQuery.build());
logger.info(javers.getJsonConverter().toJson(changes));
对于这两种情况,我都得到空数组
1条答案
按热度按时间3hvapo4f1#
尝试