Beginner |
 |
Joined: Thu Jul 31, 2008 8:28 pm Posts: 24
|
Hello, I would like to suggest an idea and tell me what you think:
I have a database with two tables: Objects and Characteristic (off course I have more tables but they are not relevant here).
I would like that every time I change characteristic of an object to save a history record of the change.
I wonder what is the best way to do that in terms of database and NHibernate.
For example, I can save the history in the same table and have a Version column which will be 0 (zero) for the current value.
I can use separate table for the history only.
For NHibernate I can have objects represent the history (which I think is the better way) or I can use interceptor to populate the history table each time Characteristic object is changed.
What do you think?
|
|