I have this persistant argument with my manager (dont they tend to be really *****) , to store audit related data completeley when an event has occured (since my project uses determing specific attributes of a object via a hirerchy, there can be thousands of rows to be stored in database)
to store enough information so that we can recreate these thousands of rows on the fly when a audit report is asked to be generated (my approch)
which ever method is taken this audit records needs to be written in a transaction.
Any comments on which is better, my take is storing thousands of records for 2 reasons is bad.
1. I cannot efficiently say how many records will be stored (there is a variable depending on data, can be 10 can be 10 thousand) and not knowing the size of transaction does bother me.
2. Ran into hibernate problems before in memory management... but I think if I use a StatelessSession this should go away (Now I am on hibernate 2.x version need to upgrade to 3.x, which is another battle with my brainless manager....).