Hibernate version: 3.1.3
Name and version of the database you are using: Oracle 10g
Hi,
I would like to ask if it is possible for Hibernate to use exactly the same timestamp value when saving or updating a hierarchy of objects during one Transaction.
It is required by our DB administrator that we have the same timestamp in all the object modified so that he can automatically handle data historization.
Currently, I'm thinking to implement this logic within the DAO, but I have to navigate the whole object tree, identify which objects have been changed during current transaction and manually set the timestamp property with the same value for all the instances.
I think this is not elegant (and I know you think the same ;-) ).
Has somebody any idea how can I implement the same logic nicer? I was thinking to use an Hibernate Interceptor for doing this... is it the correct approach? Any example for doing this?
thanks in advance,
Federico
|