• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Audit particular columns of an Entity

 
Steave John
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In hibernate, is it possible to create certain audit columns (e.g creation_time, creation_user_id) in a table and every time the entity is changed, the audit columns are updated automatically based on certain logic (e.g "creation_time" as current system time).
 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really should have an "update_time" column and update this accordingly rather than updating the "creation_time".

This link should suit your needs.

 
Steave John
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks K Tshang
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic