Hibernate version:3.0.5
Hi,
I wanted to know if it is possible to use existing entity mapping to save entities snapshots.
I would like to keep snapshots of the state of entities. The only way I can think of doing that is defining a new class and map it and copy the values to the new entity when i want to create a snapshot, as I am interested in exact copies of an existing entity, is there a way to specify a different target table for the same entity? (it is a differnt entity after all as it is immutable).
I thought maybe of a solution were the snapshot extends the origibal and add a link to the original (as the ids cant be the same as the original), but I would still prefer to seperate the tables (the two entities have different indexes)
Thanks,
Tomer
|