If I have the FlushMode as Never and if I do a session.Close() will the changes be persisted to the database?
Or do we have to explicitly say session.Flush() before session.Close()?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Close() never flushes for you (whether you have FlushMode=Never or not), and even if it did, you shouldn’t depend on that.
See: http://nhibernate.info/doc/nh/en/index.html#manipulatingdata-flushing