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 |
When throw keyword is used?
What are the access modifiers in java?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?
What is an anonymous class?
How to instantiate member inner class?
What is array list in java?
Explain about anonymous inner classes ?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Does constructor return any value?
What is runtime locatable code?
When do we use hashset over treeset?
Where is stringbuffer stored?