Spring Transactional annotation, isolation not working for READ_UNCOMMITTED

眉间皱痕 提交于 2019-12-08 21:19:24

Generally in Hibernate , in the same transaction , while flushing(committing) it always follows a particular order.

Inserts are first executed and then deletes are executed while flushing.

So ideally in your case , since you are deleting before insert just call enitityManager.flush() explicitly after delete .

Alternatively also have a look at EntityManager.setFlushMode() method where you can set to flush mode type to either commit or auto

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