Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which is faster call by value or call by reference?

940


Why array is used in java?

968


Explain about wait() method?

1025


Can I declare a class as private?

1087


Can we sort array in java?

948


How do you create a sop?

1004


What are multiple inheritances?

1108


What is constructor chaining in java?

1062


How do you add spaces in java?

1008


Differentiate storage classes on the basis of their scope?

1171


How to create an immutable class?

1109


Which arithmetic operations can result in the throwing of an arithmeticexception?

1027


What is meant by memory leak?

1074


What is maximum size of arraylist in java?

1031


What is the use of :: in java?

1012