Hibernate / Hibernate interview questions II
Refreshing Entity objects using refresh() Method in Hibernate.
Sometimes, it is required to re-load an object and its collections at a time when the application database is modified with some external application or database triggers and thus corresponding hibernate entity in your becomes out of sync with its database representation.
In this case, one can use session.refresh() method to re-populate the entity with latest data available in database.
More Related questions...