Db is on 3rd machine.
How to update these columns?
Example from code:
public InitialStateEntity findByIdWithLock(Long id)
{
DetachedCriteria criteria = DetachedCriteria.forClass(InitialStateEntity.class);
criteria.add(Restrictions.idEq(id));
criteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
return (InitialStateEntity) criteria.getExecutableCriteria(getSession()).uniqueResult();
}
Ref:
https://docs.jboss.org/hibernate/orm/3.3/reference/en/html/transactions.html
No comments:
Post a Comment