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 |
How do I know if java is installed?
I want to store more than 10 objects in a remote server? Which methodology will follow?
In Inheritance if we are implementing Multi level inheritance and all class having same name of variable and now i want to access each class variable and how it is possible?
How are the elements of a gridbaglayout organized in java programming?
Does string isempty check for null?
why doesn't java run on all platforms?
After compilation of java program we'll get .class code. If it's generated in OS Windows XP will it work on OS Linux? If yes why? If no why?
what is meant by string pooling?
12 Answers Oracle, Polaris, Tribal Fusion, Wipro,
What is a constructor overloading in java?
What is a Transient Object?
0 Answers InfoAxon Technologies,
what are abstract functions?
What is the purpose of the return statement?