Any way to empty JaversRepository?

65 Views Asked by At

During my implementation of JaVers in my microservice, i've been doing tests with the commits, to get familiarized with JaVers. However, now i configued it with a MongoRepository, and it has brought me all the commits from the JaVers repository i do not need. There is any way to empty that from JaVers repository (i guess it is stored there always)?

1

There are 1 best solutions below

1
On BEST ANSWER

There is the clean() method in MongoRepository but it's package private.

void clean(){
    snapshotsCollection().deleteMany(new Document());
    headCollection().deleteMany(new Document());
}