I am going through Hibernate Documentation an came across the LockModes
. Are these same as Isolation levels
that we use for database? How are they diff
UPGRADE means that you want to modify the loaded object and you don't want any other process to change it while you're in the process.
It's an odd combination to use load with UPGRADE, because load is generally used just to have reference to the object to be able to use it while modifying some other object. e.g.
DomesticCat kitten = (DomesticCat)session.get(DomesticCat.class, 2L);
kitten.setParent(d1);
That is why if you use a load, Hibernate will only load it if you start referencing properties.