This can be caused both by the cache of the first (session), and the second (for example, ehcache). To re-read the object, you need to call session.refresh ().
From hibernate docs (bottom of section)
You can reload the object and all its collections at any time using the refresh () method. This is useful when database triggers are used to initialize some properties of an object.
sess.save(cat); sess.flush();
source share