例如:
<update id="updateByPrimary" >
update 1 .....;
update 2......;
update 3......;
</update >
和
<update id="updateByPrimary1" >
update 1 .....;
</update >
<update id="updateByPrimary2" >
update 2......;
</update >
<update id="updateByPrimary3" >
update 3......;
</update >这两种有啥区别?第一种自带事务控制嘛?
<update id="updateByPrimary" >
update 1 .....;
update 2......;
update 3......;
</update >
和
<update id="updateByPrimary1" >
update 1 .....;
</update >
<update id="updateByPrimary2" >
update 2......;
</update >
<update id="updateByPrimary3" >
update 3......;
</update >这两种有啥区别?第一种自带事务控制嘛?
update 1 .....;
update 2......;
update 3......;
</update >
在第三条写一个非法sql 看看之前两个是否回滚
这是TX控制的问题,比如Spring的TX之类负责,即使写在多个完全不相干的处理中,只要是一个TX控制下,该回滚还是要回滚,与ibatis写法没有关系吧。
这是TX控制的问题,比如Spring的TX之类负责,即使写在多个完全不相干的处理中,只要是一个TX控制下,该回滚还是要回滚,与ibatis写法没有关系吧。有实验过嘛? 我感觉第二种写法不会有事务了,如果spring没有加上事务控制的话