GeeCON Prague 2014*
The moose likes Object Relational Mapping and the fly likes comparing db records before and after update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "comparing db records before and after update" Watch "comparing db records before and after update" New topic
Author

comparing db records before and after update

maganti suryanarayana
Ranch Hand

Joined: Mar 30, 2010
Posts: 53

hi, i would like to know how to compare the database table records before and after update statement and retrive the field values which are changed.


surya
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1650
    
    7

Sounds like what you want to do is audit. Have a look at using hibernate-envers for this.

http://docs.jboss.org/hibernate/core/4.1/devguide/en-US/html/ch15.html#envers-tracking-properties-changes


[How To Ask Questions][Read before you PM me]
 
GeeCON Prague 2014
 
subject: comparing db records before and after update