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 |
If two threads call a static method at the same point of time, what will happen?
Can an interface have a constructor?
What is boolean keyword in java?
How do you identify independent and dependent variables?
What is output buffer?
can rmi and corba based applications interact ?
What is a consumer in java?
what is features of jdk 1.5?
2 Answers Accenture, Satyam, TCS,
How do you add spaces in java?
Why are functions called methods in java?
Name the package that always imported by default?
How do you reverse sort a list in java?