jQuery in Action, 2nd edition*
The moose likes Other Application Frameworks and the fly likes Hibernate related Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Hibernate related" Watch "Hibernate related" New topic

Hibernate related

srikanth darbha

Joined: May 19, 2013
Posts: 29

Difference between save and persist method in Hibernate.The below point is given on browsing,but i am not able to understand the below point can any one please elaborate the below point.

One more thing which differentiate persist and save method in Hibernate is that is there behavior on outside of transaction boundaries. persist() method guarantees that it will not execute an INSERT statement if it is called outside of transaction boundaries. save() method does not guarantee the same, it returns an identifier, and if an INSERT has to be executed to get the identifier (e.g. "identity" generator), this INSERT happens immediately, no matter if you are inside or outside of a transaction.

I agree. Here's the link: http://aspose.com/file-tools
subject: Hibernate related
Similar Threads
difference between save() and persist() method
Hibernate can access private fields and methods ? How come ?
question about transaction attribute
Set the transcation boundry in DO using spring jdbc framework
Transcation management at DO level using spring jdbc framework