All you do in the session is commit to the database as soon as you complete the transaction. Even when you clear a session, you simply add the changes to the table to memory, but do not commit the database.
So, as soon as Hibernate detects that the session is dirty, it will make a change if you have automatic dirt checking in your configuration and it will be smart enough to see the last change in your object session. So yes, you will have a "Other Name"
source share