The goal of the flush mechanism of Hibernate is to sychronize the state of your persistent objects that are in the session with the database. Basically you can have a persistent oject in in your hibernate sesion. If you change its state, the state will not reflect the database content anymore. On the flush hibernate synchronizes the database with the new state of your object.
hope it will help. [ October 28, 2008: Message edited by: ntumba lobo ]
As far I know,Flush is used to synchronize the state of persistent onject to database.In fact, there can be different Flush modes which includes FLUSH.NONE,FLUSH.AUTO,FLUSH.COMMIT.As the name suggests, when FLUSH.NONE is set ,developer have to call flush explicitly,on Flush.AUTO, flush is executed before every query and on FLUSH.COMMIT,flush is executed before every database updation...that's all i know about flush..hope this information will be helpful.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop