spring-projects / spring-data-jpa

Simplifies the development of creating a JPA-based data access layer.
https://spring.io/projects/spring-data-jpa/
Apache License 2.0
3.01k stars 1.42k forks source link

Search all revisions by class type - spring-data-envers #2481

Open gomezAlvaro opened 2 years ago

gomezAlvaro commented 2 years ago

Hello,

Currently there's no way to get all the revisions for a given class, you always have to pass the ID as a parameter.

This makes it harder to retrieve information on records that have already been deleted (you cannot search for the revision information as you don't have the ID anymore.

Ideally we would have two additional methods in RevisionRepository: findAllRevisions() and findAllRevisions(Pageable pageable)

What do you think?

Thanks

showaid commented 1 year ago

I'd love to give this feature a very big thumb up.

coenvk commented 1 year ago

This seems like an issue for the spring-data-commons repo where the RevisionRepository is defined. After the methods have been added to the interface, implementation classes can be updated.