Closed
Description
I want to integrate Javers on a database which is already in use.
If I mark an entity as deleted with javers.commitShallowDelete
(for example Customer) for which no INITIAL
snapshot is yet stored,
javers.findChanges(QueryBuilder.byClass(Customer.class).build());
throws the following exception:
java.lang.IllegalArgumentException: Version is not a positive number.
at org.javers.common.validation.Validate.argumentCheck(Validate.java:43)
at org.javers.repository.api.SnapshotIdentifier.<init>(SnapshotIdentifier.java:16)
at org.javers.repository.api.SnapshotIdentifier.previous(SnapshotIdentifier.java:35)
at org.javers.core.snapshot.SnapshotDiffer.calculateDiffs(SnapshotDiffer.java:43)
at org.javers.repository.api.JaversExtendedRepository.getChangesIntroducedBySnapshots(JaversExtendedRepository.java:181)
at org.javers.repository.api.JaversExtendedRepository.getChangeHistory(JaversExtendedRepository.java:49)
at org.javers.repository.jql.ChangesQueryRunner.queryForChanges(ChangesQueryRunner.java:34)
at org.javers.repository.jql.QueryRunner.queryForChanges(QueryRunner.java:46)
at org.javers.core.JaversCore.findChanges(JaversCore.java:206)
Javers' Version
6.2.3