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

Does constructor creates the object ?

1082


What is a website container?

1008


Is a method a function?

1097


What is stringwriter?

1023


Can extern variables be initialized?

993


What is meant by object oriented programming – oop?

1048


What restrictions are placed on method overloading in java programming?

1108


What is boolean logic?

1073


What are the types of relation?

1107


Explain the scope or life time of class variables or static variables?

1039


What is string substring?

1204


Why do I need to declare the type of a variable in java?

1154


In a class implementing an interface, can we change the value of any variable defined in the interface?

1144


What is lambda expression in java?

1108


What is a local block?

1192