多个查询作为orm.xml文件中的命名本机查询

时间:2020-06-01 11:07:43

标签: sql jpa orm mybatis nativequery

我想在orm.xml文件中将多个查询作为一个具名的本机查询编写。我试图将查询分开;但我有无效的表达式异常。我已经尝试过/,但是不幸的是我遇到了同样的例外。我怎样才能做到这一点? -----------

 <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>

0 个答案:

没有答案