When do you use merge() and update() in hibernate?
Answer / Brahmanand Thakur
You use the 'merge' method when you want to merge the changes made to a detached object into the persistent context, or when you want to obtain a managed instance associated with the session. The 'update' method is used for updating an existing record in the database without loading it into the session.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between and merge and update?
What the three inheritance models are of hibernate?
How many types of cascade are there in hibernate?
What is mapping class in hibernate?
Difference between load and get?
What is query interface in hibernate?
Why do we use hibernate?
How does hibernate save work?
What are different types of caches available in hibernate?
Can we use only jpa without hibernate?
What is an orm tool?
How to call stored procedure in hibernate with out parameter example?