Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-7

Add possibility to integrate versioning infrastructure like Hibernate Envers

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2 GA
    • Component/s: Core
    • Labels:
      None

      Description

      The auditing capabilities currently serve rudimentary requirements of tracking who created and modified entities. However there are more sophisticated frameworks like Hibernate Envers out there that transparently create revisions for all entities saved and allows accessing those in direct entity access as well as triggering queries on a particular revision. So a potential support for something like this is two fold. First we have to have an extension of Repository interface with methods like:

      T findById(ID id, Object revision);
      
      List<T> findAll(Object revision);
      

      On the other hand the query execution engine could be made aware of the revision a query shall be run against:

      List<User> findByUsername(String username, @Revision Object revision);
      

      As Envers is just one potential candidate we'd have to make the actual versioning library pluggable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olivergierke Oliver Gierke
                Reporter:
                olivergierke Oliver Gierke
                Last updater:
                Trevor Marshall
              • Votes:
                5 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: