Difference between flush() and commit() in hibernate?
Answers were Sorted based on User's Feedback
Answer / aslam mohammed c l
Flushing the Session simply makes the data that is currently
in the session synchronized with what is in the database.
However, just because you have flushed, doesn't mean the
data can't be rolled back.
Commit does flush the session, but it also ends the unit of
To summarize commit does two things,
1. Commit internally does flush
2. Ends the unit of work (makes the changes permanent).
|Is This Answer Correct ?||21 Yes||2 No|
Answer / ijaz ahmed
|Is This Answer Correct ?||6 Yes||2 No|
What is the life-cycle of an object?
What exactly is a .class file?
How do you check if a number is a perfect square?
What is the default modifier in Interface?
What is Unicast and Multicast object? Where we will use?
what is different between static and non static methods ,using example
What is sizeof () operator?
What is the primitive type short?
I want to persist data of objects for later use. What’s the best approach to do so?
What is a Null object?
What is the difference between pageContext and page implicit objects in jsp?
What is string in java is it a data type?