jakartaee / persistence

https://jakartaee.github.io/persistence/
Other
199 stars 59 forks source link

Standardise Auditing as JPA version handler #216

Open gergelymolnarpro opened 5 years ago

gergelymolnarpro commented 5 years ago

Now the JPA has a versioning, but it is for optimistic handling of concurrency. The version handling of data/entity like Hibernate Envers, EclipseLink really fits into Enterprise Platform/JPA.

New strategy: the version (audit) table should only store the changes per row for reduce size of database.

More security: store principal name/object into version/audit table who triggered the changes (optional)

andyjefferson commented 5 years ago

-1 In the same way EclipseLink has its own way of auditing, and other providers have their own ways. Any standardisation would be of an API (and associated specification metadata), not of an implementation (which Envers is).

gergelymolnarpro commented 5 years ago

-1 In the same way EclipseLink has its own way of auditing, and other providers have their own ways. Any standardisation would be of an API (and associated specification metadata), not of an implementation (which Envers is).

The point is the Auditing/version handling: Interfaces and annotations.

rbygrave commented 5 years ago

Well, Envers pretty much ignores the SQL 2011 Temporal features of databases (SQL standard) so there is potential for a lot of debate here.

It is a good debate to have. I am happy to be involved but for me Envers not an 'obviously good starting point' when you include the standard SQL Temporal features. It would not surprise me if this is harder to get agreement than it seems.

Do you have a specific set of interfaces and annotations that you want to see become a standard? If so I can add some thoughts on how they might work from a SQL 2011 perspective.

gergelymolnarpro commented 5 years ago

I will create a sample, but that is only for show, I wouldn't like to reinvent the wheel.

m-reza-rahman commented 3 years ago

Has a more detailed proposal that a variety of vendors can begin to collaborate on emerged or emerging soon? If not, I suggest closing this to reduce clutter and focus on higher value add items for a wider set of users?

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.