How to keep historic details of modification in a database (Audit trail)?
        Posted  
        
            by mada
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mada
        
        
        
        Published on 2010-03-27T19:54:31Z
        Indexed on 
            2010/03/27
            20:23 UTC
        
        
        Read the original article
        Hit count: 331
        
I'm a J2EE developer & we are using hibernate mapping with a PostgreSQL database.
We have to keep track of any changes occurs in the database, in others words all previous & current values of any field should be saved. Each field can be any type (bytea, int, char...)
With a simple table it is easy but we a graph of objects things are more difficult.
So we have, speaking in a UML point of view, a graph of objects to store in the database with every changes & the user.
Any idea or pattern how to do that?
© Stack Overflow or respective owner