i wonder why sometimes one uses transaction and other times session.flush():
Session s;
Transaction t;
do something
t.commit();
but you use:
...
do something
s.flush();
is there any relevant reason for that?
i read
here the following:
If you happen to be using the Transaction API, you don't need to worry about this step. It will be performed implicitly when the transaction is committed. Otherwise you should call Session.flush() to ensure that all changes are synchronized with the database.
but which is better, or, is there any relevant criteria for using one in preference for another?
i'm using MySql standard in a stand alone app
[ March 09, 2005: Message edited by: miguel lisboa ]