flush will sync the session data with the DataBase. Here it will execute only update....it will not execute the commit(). Here it will check the session data with the DataBase and if there is difference then it will sync session data with the DB...
flush == update
commit == update + commit
It force the session to flush. Must be called at the end of a unit of work,before committing the transaction and closing the session(tx.commit() will do flush and commit).Flushing is the process of sync-ing the underlying persistant store with the persistable state held in the memory....
flush == update
commit == update + commit
It force the session to flush. Must be called at the end of a unit of work,before committing the transaction and closing the session(tx.commit() will do flush and commit).Flushing is the process of sync-ing the underlying persistant store with the persistable state held in the memory....