Difference between flush() and commit() in hibernate?
Answer Posted / 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 |
Post New Answer View All Answers
What is the use of 'super' keyword inside a constructor?
What is the java idl system?
Is string pool garbage collected?
What is functional interface in java example?
What lambda means?
What do you mean by data type?
Explain public static void main(string args[]) in java.
What are recursive functions? Give some examples?
What is java virtual machine? Explain
what is abstract class in Java?
How many bytes are a float?
Is alive method in java?
What is string in java with example?
What is the difference between an object-oriented programming language and object-based programming language?
How do I convert a string to an int in java?