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 means public static?
What are the different types of constructor?
what is the major difference between linkedlist and arraylist in java?
What is java autoboxing?
What about interrupt() method of thread class ?
What is use of set in java?
What is high level language in computer?
Write a java program to check if a number is prime or not?
Explain the difference between comparator and comparable in java?
What is arraylist class in java?
Describe the Big-O Notation.
Define how destructors are defined in java?
What is the collection interface?
What is an abstract method in java programming?
Is c better than java?