New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbstractAuditable should have an equivalent annotation similar to @Audited of Hibernate Envers [DATAJPA-116] #542
Comments
Mark Serrano commented I understand I'm "not really" forced to extend from AbstractAuditable but I can create my own class but then again, it's like creating from scratch when AbstractAuditable is already viable. And besides this custom class that I will be making isn't annotation too |
Oliver Drotbohm commented I've started to sketch out a spec for a feature like this in a local ticket already so I'll just add it to the discussion here: To use the auditing feature of Spring Data JPA entities have to implement the I propose the following annotations to be introduced:
For the dates we should support |
Eugen Paraschiv commented Separating these responsibilities would be a very good thing, as the audit needs do not usually fit these exact four concerns. |
Nicholas Padilla commented This does make sense to implement. It will also make it easier to upgrade existing code to use the Audit framework. I'll look at this a bit more myself next week |
Ranie Jade Ramiso commented I am experimenting on this, my implementation is based on what Oliver proposed. Have not test it yet though, will do so in the weekend. The current implementation checks fields annotated with the proposed Annotations, and insert the appropriate values via reflection. My implementation revolves around the |
Oliver Drotbohm commented Good to hear, Ranie Jade Ramiso! It would be perfect if you could already try to split up the implementation into stuff that could make it into Spring Data Commons (annotations, generic support infrastructure) and the Spring Data JPA specific adapter (i.e. the If you don't have the time to get into that, feel free to submit a pull request of whatever kind. I'll sort that stuff out then myself |
Ranie Jade Ramiso commented Hi Oliver I did separate the implementation. Take a look at it for the data commons part at my fork. I can submit a pull request if you like |
spring-projects-issues commentedOct 14, 2011
Mark Serrano opened DATAJPA-116 and commented
When adding auditing capabilities my domain class is forced to extend from org.springframework.data.jpa.domain.AbstractAuditable
However, with Hibernate Envers, I just need to add @Audited
Wouldn't it be nicer if we have an equivalent annotation for AbstractAuditable? Maybe like:
Thanks
Affects: 1.1 M1
Issue Links:
5 votes, 6 watchers
The text was updated successfully, but these errors were encountered: