Skip to content

Commit

Permalink
Get rid of usage of deprecated method from javers
Browse files Browse the repository at this point in the history
as withNewObjectChanges is deprecated and has no effect
  • Loading branch information
OmarHawk committed Feb 29, 2024
1 parent a1fe2d7 commit 1fe8bd8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public class JaversEntityAuditResource {

Class entityTypeToFetch = Class.forName("<%=packageName%>.domain." + entityType);
QueryBuilder jqlQuery = QueryBuilder.byClass(entityTypeToFetch)
.limit(limit)
.withNewObjectChanges(true);
.limit(limit);

List<CdoSnapshot> snapshots = javers.findSnapshots(jqlQuery.build());

Expand Down Expand Up @@ -116,8 +115,7 @@ public class JaversEntityAuditResource {

QueryBuilder jqlQuery = QueryBuilder.byInstanceId(entityId, entityTypeToFetch)
.limit(1)
.withVersion(commitVersion - 1)
.withNewObjectChanges(true);
.withVersion(commitVersion - 1);

EntityAuditEvent prev = EntityAuditEvent.fromJaversSnapshot(javers.findSnapshots(jqlQuery.build()).get(0));

Expand Down

0 comments on commit 1fe8bd8

Please sign in to comment.