How to disable the lock system of JPA?

谁说我不能喝 提交于 2019-12-01 19:37:26

But how can I deal with it ?

It depends on your application... you'll need to do what makes the most sense. Perhaps you need to prompt your user that the data was concurrently modified and have then resubmit with the new(er) data?

While I don't think disabling OptimisticLocking is the correct solution, I think setting these two properties will get rid of the OLEs you are seeing.

<properties>
  <property name="openjpa.Optimistic" value="false"/>
  <property name="openjpa.LockManager" value="none"/>
</properties>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!