在orm.xml fle中作为命名本机查询的多个查询

bwitn5fc  于 2021-08-13  发布在  Java
关注(0)|答案(1)|浏览(297)

我想在orm.xml文件中将多个查询作为一个命名的本机查询来编写。我试着用不同的方法把问题分开;但我有一个无效的表达式异常。我试过了,不幸的是我也遇到了同样的例外。我该怎么做

nhaq1z21

nhaq1z211#

<named-native-query name="action.physicalDelete">
 <query>
   delete
   from table1 a
   where a.id =?1
   ;
   delete
   from table2 b
   where b.id= ?1
   ;
   delete
   from table3 c
   where c.id= ?1
   ;
   delete
   from table4 d
   where d.id= ?1
 </query>
  </named-native-query>

相关问题