I am new to Hibernate. Please tell me what is the use of getHibernateTemplate().flush()
and how it works.
views:
47answers:
1
A:
When using Hibernate, entities are loaded into a persistence context called the session
and changes like creating, updating, deleting persistent objects are actually made in memory. When you want or need to synchronize the in memory state with the database to make changes persistent, you need to flush
the session
, causing Hibernate to generate the appropriate SQL insert, update, delete statements.
Pascal Thivent
2010-09-22 06:06:17
thnk u very much Pascal
2010-09-23 04:44:29