Organizational Research By

Surprising Reserch Topic

What is the difference between and merge and update in hibernate?


difference between and merge and update in hibernate

 

Use update() if you are sure that the session does not contain an already persistent instance with the same identifier, and merge() if you want to merge your modifications at any time without consideration of the state of the session. In other words, update() is usually the first method you would call in a fresh session, ensuring that reattachment of your detached instances is the first operation that is executed.


 

This term is basically used in svn (storage repository)

Merge: Merging new code with existing one

Update: After Merging or starting new task its very imp. to take updated file of working copy

 

suppose you have detached object (means after closing session persistence object becomes detached object) and you have done some changes in this object with help of setter method now you created new ...

 

asked Jul 1, 2015 in hibernate by rajesh
0 votes
49 views



Related Hot Questions



Government Jobs Opening


...