InterviewSolution
Saved Bookmarks
| 1. |
Differentiate between save() and saveOrUpdate() methods in hibernate session. |
||||||||||
|
Answer» Both the methods save records to the table in the database in case there are no records with the primary key in the table. However, the main differences between these two are listed below:
Clearly, saveOrUpdate() is more flexible in terms of use but it involves extra processing to find out whether a record already exists in the table or not. |
|||||||||||