* the application loads an object in the first session
* the object is passed up to the UI tier
* some modifications are made to the object
* the object is passed back down to the business logic tier
* the application persists these modifications by calling update() in a second session
My observation was if I used update() to persist the modifications, I needed to call flush() method to persist the changes to the database. Whereas, if I used saveOrUpdate(), the changes were persisted in the database without flush(). What my simple understanding of saveOrUpdate() was if it was not there execute a SQL INSERT a new row otherwise SQL UPDATE the exisiting row with the new data. Is there anything else I not aware of?
I am using Wicket with org.springframework.orm.hibernate3.support.OpenSessionInViewFilter filter