Hibernate (Java) Question:
What is the difference between and merge and update?
Answer:
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.
Previous Question | Next Question |
What is the difference between load() and get()? | How do you define sequence generated primary key in hibernate? |