| When calling saveOrUpdate on a detached object it performs a save and not an update. The updated is performed if the object is attached to the session. The Hibernate 5.2 documentation states that saveOrUpdate performs a reattach. I am including the files to reproduce the issue. |