hibernate update vs JPA merge on detached instance

南笙酒味 提交于 2019-12-08 08:15:53

问题


Both will update the persistent state but

  • merge will return attached instance letting the given one unchanged.
  • update will attach the given instance

my question is so : will JPA merge also trigger a select (i suppose it will to get the attached instance) whereas hibernate update won't ?

please don't try to explain me things that can already be found here What are the differences between the different saving methods in Hibernate?

来源:https://stackoverflow.com/questions/22459233/hibernate-update-vs-jpa-merge-on-detached-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!