Joined: Wed Apr 19, 2006 12:50 pm Posts: 8
|
i have two rather simple questions:
1) i am trying to lock a row prior to doing the update in order to avoid blocking other transactions updating the same row (i am using optimistic locking with a version column).
I am doing the following to lock and update:
session.lock(customer, LockMode.UPGRADE_NOWAIT);
session.evict(customer);
session.update(customer);
as far as i understand the evict is needed in order to make the object detached before any update can occur. However i am in doubt if this is the best approach..?
2) I need to map a timestamp with time zone information. Is the only way to do this mapping via implementing a custom mapping type or is there a simpler way..?
regards
Rasmus
|
|