Hi all,
Now I'm confused
no difference between
refresh() and
load() on LockMode.READ.
It's to check version number(@Version) or not.
e.g.
here version number of entity checked
Code:
session.lock(entity, LockMode.READ);
if version number is stale, throws an exception.
here version number of entity
NOT checked
Code:
session.refresh(entity, LockMode.READ);
version number is updated corresponding with DB.
Is it odd, asymetric, isn't it??
or a bug?
if this is a fact,
the difference
Code:
session.refresh(entity, LockMode.READ);
and
Code:
session.refresh(entity, LockMode.NONE);
makes what??
using
Hibernate 3.3.2GA
Hibernate Annotations 3.4.0.GA