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
work.
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 |
What is static binding and where it occurs?
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
What are peerless components in java programming?
What do you mean by chromounits in java8?
if a java file without any source code is valid java file?
What is the purpose of a volatile variable?
Is java 11 paid version?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
What is the USE of Null interfaces ??...if thers nothing inside these interfaces how are they used and WHy are they used ???? No 1 has given a proper description yet
How do you do math powers in java?
What is stop(), suspend(), resume() method?