Complemento o método para obtener una funcionalidad similar como django-reversion en Grails

Is there any way to get similar functionality like django-reversion for Grails?

I mainly require the following functionality of the django extension on Grails:

Vuelva a cualquier punto en el historial de un modelo: ¡una función de deshacer ilimitada!

Recupere modelos eliminados: ¡nunca vuelva a perder datos!

Group related changes into revisions that can be rolled back in a single transaction.

Automatically save a new version whenever your model changes Automate your revision management with easy-to-use middleware.

Use Case: In Django I used it to create report based on the data on a particular date. In general, it is useful if any accidental update happens or you need to track any particular update and revert it. Also I think it is vital for all application dealing with sensitive data.

preguntado el 17 de mayo de 13 a las 08:05

What's the use case for which you need this feature? -

1 Respuestas

I don't know about out of the box functionality, but what I often do is to build up a history:

Let's use a Book domain class as example:

class Book { ... }

with a simple histoty domain class

class BookHistory extends Book {}

this class inherits all properties from the parent class and will be stored in the same table as the Book class.

You'll then have to change the save and update actions in your controller in order to store the current Book instance as BookHistory.

Et voila, you have a history and will be able to check the state of an object at each point in history...

contestado el 17 de mayo de 13 a las 18:05

Thanks for mentioning audit trail plugin. Have you used it. Is there any function to rollback on a particular date. - bizcocho

Grails Audit Logging Plugin (with verbose mode on) have almost all functionality of reversion. Checkía-registro - bizcocho

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.