Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9042817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:35:28+00:00 2026-06-16T10:35:28+00:00

Can I somehow use spring Auditing to get list changed fields of entity and

  • 0

Can I somehow use spring Auditing to get list changed fields of entity and their old, new values?

I was trying to get the list of updated fields for entity and their old and new values for logs. I used getDeclaredFields to compare old entity and new entity before updating, and it works. But still was wondering if there are some standart and simplier ways of solution.
I am using spring and hibernate to manage my entities.
After researching I found that there can be used hibernate session for my purposes, by adding listener on updating event and using getDirtyProperties from event. But as I understood it requires hibernate transaction manager, and I am already using JpaTransactionManager and can not change it.

Then I was told about this spring audit feature
http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/#jpa.auditing
and the question is if it can provide something like getDirtyProperties? Or maybe there are another ways of solution? Because creating new tables is unwanted, and if I get it right, spring auditing requires storage audit data in data base.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:35:30+00:00Added an answer on June 16, 2026 at 10:35 am

    There’s actually nothing in Spring’s Auditable that requires it be stored in the database, but it also doesn’t include the level of detail you’re looking for as far as which fields changed. Hibernate Envers does that, but I believe it can only store audit records in the database. You might be able to use it as a starting point, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working all day and I somehow can't get this probably easy task
Can I get somehow(from a database or other source) a percentage of the phones
Long story below short question: How can I get Spring's NamedParameterJDBCTemplate join Hibernate's session?
I would like to somehow inject all HttpMessageConverter instances registered in Spring-MVC. I can
when creating a Webservice, can I somehow use static String vars? @WebService( portName =
Can this somehow work? do I have to use @InitBinder somehow? public String myActionHandler(ModelMap
I am trying to use Apache Shiro with Spring MVC. The controllers we expose
Can I somehow disable ListView items navigation through keyboard (arrow keys), and leave navigation
Can you somehow lock an iPad to Safari and only one webpage? I've found
Can I somehow automatically add a node to a specific nodequeue when it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.