shinoyvv2002 wrote:
Thanks for ur reply ...
Suppose if we have to send data to more than 2 tables(Eg: 5 or 6 tables) in an order according to our program.Then to syncronise do we need to call flush before each save,update ,delete operations?or just call flush before commit..is it sufficient?
<parenthesis :-)>First, please preview your post before actually submitting. It will give a more readable thing : better for your chances to get an answer, and better for the users that will maybe search the archives in the future and find this post. Thanks</parenthesis>
Normally, you do not always need to call flush(). It's just sometimes useful to workaround problems like the one you met. Remember that commiting a transaction will flush your session, so there should be no need to call flush() explictly before commit.
(Also remember that session object should be short-lived, so trash it after each tx and create a new one, but this is maybe what you already do :-).)