Friday, 17 February 2012

What is the difference between merge and update? | Java Hibernate

update () : When the session does not contain an persistent instance with the same identifier, and if it is sure use update for the data persistence in hibernate.
merge (): Irrespective of the state of a session, if there is a need to save the modifications at any given time, use merge().

No comments: