August 2017
Beginner to intermediate
370 pages
8h 37m
English
Update or merge operation are Session APIs, which results in an SQL Update. The update() method results in the update of a persistent instance with the ID of the given detached instance, while the merge() method results in the state of the detached instance getting copied onto the persistent object with the same ID. The following are the related APIs:
void update(Object object) throws HibernateException void update(String entityName, Object object) throws HibernateException Object merge(Object object) throws HibernateException Object merge(String entityName, Object object) throws HibernateException
The following happens as a result of invocation of the update method:
Read now
Unlock full access