Let's say we have a web application using Hibernate. My question is about what happen, if two different transations from different users, access and manipulate the same entity ? For example we have an entity named 'Student' and it has a field 'age'. Now, two different transaction from different users, fetch that entity using Hibernate session e.g :
Student student = session.load(1); // 1 is the id of some student
and then one user manipulate the age fields e.g: student.setAge(12); Does the second user see that change in completely another transaction ? I mean if the second user invokes in his own transaction student.getAge(), does he see the new value - 12 ? Notice, that the first user, who changes the age property, didn't commited the transaction yet.