Hi Thierry!
tahcow wrote:
how could i set the lastMod column on insert and update with the time of my database server instead of the time of my appserver.
I don't think it is a good idea to set version timestamp manually. As I got version is a utility field that is needed for optimistic locking and updating objects with composite-id. So let hibernate set it himself (it uses application server timestamp). As rule I use field access to all my versions and don't have setters for them for avoiding troubles.
If you need business timestamp field with database timestamp, introduce it and use SQL trigger or set it's default value to 'SYSTEM_DATE', 'CURRENT_TIMESTAMP' via SQL default clause of CREATE TABLE.