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 Hash Code in Java?
How do you use compareto method?
What is int lol?
Every class extends object but why it is not possible for every object to invoke clone() method. ideally protected methods should be accessible from sub classes. isn't it?
What is the specification of ?CODEBASE? in an applet?
Explain the difference between intermediate and terminal operations in java8?
How do you escape json?
how can u apply shallow cloning and deep cloning to create object?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
Why inputstreamreader is used in java?
What is a stack class in java ?
0 Answers Akamai Technologies,
What is difference between next () and nextline () in java?