📜  执行更新删除查询 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:19.343000             🧑  作者: Mango

代码示例1
/* I received this exception when trying to run a bulk UPDATE query in a non-JTA
(i.e. resource-local) entity manager in Java SE. 
I had simply forgotten to wrap my JPQL code in*/

em.getTransaction().begin();

//and

em.getTransaction().commit();