Coder Social home page Coder Social logo

Comments (5)

spring-projects-issues avatar spring-projects-issues commented on May 15, 2024

Nicholas Padilla commented

I'd really like to see this implemented as well. I don't like having to use ORM specific features and since I am using Spring Data for everything else it makes sense to use a "history" feature as well. I have the Audit set up working and now trying to formulate a plan for dealing with the history aspect of this.

In most use cases you will want to get all revisions of a particular entity, to display for end user viewing of the changes, not just a single revision. All other methods should return just the latest revision. Although, having an ability(as you have laid out) to get a specific revision to maybe update or roll back changes to a that revision would be helpful. Or maybe just providing a rollback function that will do the rollback for you would be even nicer.

Maybe we could create another Repository that is HistoricalRepository that we can add to the current entity repository or to a new HistoricalRepository that a new class would extend for the same entity. This way we can have a separation of concerns and not bloat a SimpleJpaRepository (or JpaRepository which already has lots of methods) with additional clutter. If an end user wants to perform all functions in the same class, that ability is still there but not required. I will be looking more at this next week, I'll pull down the spring data repo and see what this feature will take.

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 15, 2024

Oliver Drotbohm commented

You might wanna take a look at the Spring Data Envers project and see in how far this actually helps you already

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 15, 2024

Nicholas Padilla commented

Hey Oliver!

Thanks for the heads up! However, it looks like you are using a Hibernate specific implementation. I am using EclipseLink and am not sure if the mismatch will work. Hibernate is not really my first choice. Let me know if eclipselink will work with this module or not, that way I don't have to spend that time! :) If anything I will test it out and see if I can take it anywhere. If it fails then I will use it as reference code to implement an eclipselink specific variation.

EclipseLink uses session events to implement its history tracking: http://wiki.eclipse.org/Introduction_to_EclipseLink_Sessions_%28ELUG%29#Table_83-2.

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 15, 2024

Oliver Drotbohm commented

Closing this as fixed as we have a Hibernate Envers specific implementation in place with the Spring Data Envers project. Adding additional implementations based on other JPA providers versioning infrastructure should be tracked with tickets in Spring Data Commons with requests (or even started implementations) for concrete implementations.

Marking this as fixed agains 1.2 GA as there will be a release of Spring Data Envers based on this Spring Data JPA version

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 15, 2024

Oliver Drotbohm commented

Closing this as fixed as we have a Hibernate Envers specific implementation in place with the Spring Data Envers project. Adding additional implementations based on other JPA providers versioning infrastructure should be tracked with tickets in Spring Data Commons with requests (or even started implementations) for concrete implementations.

Marking this as fixed agains 1.2 GA as there will be a release of Spring Data Envers based on this Spring Data JPA version

from spring-data-jpa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.