论坛首页 Java企业应用论坛

关于ibatis多条sql不抛异常的问题

浏览 2593 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2016-10-26  
ibatis中多条SQL时,第一句SQL不报错的话,后面发生异常(如下:T_DYNAMIC_TEMP_TEMPLATE_MODULE_1表不存在),ibatis不会抛错出来,如果SQL互换一下,ibatis会抛错出来,不知道啥原因?
<insert id="DYNATEMP.publishTempTemplateById" parameterClass="map">
begin
insert into T_DYNAMIC_ONLINE_TEMPLATE
(id, name, layout, status, create_time, update_time, publish_time)
select
id, name, layout, '2', create_time, update_time, getDate()
from
T_DYNAMIC_TEMP_TEMPLATE
where
id = #id#
end;

begin
insert into T_DYNAMIC_ONLINE_TEMPLATE_MODULE
(id, template_id, block_name, module_id, block_order)
select
id, template_id, block_name, module_id, block_order
from
T_DYNAMIC_TEMP_TEMPLATE_MODULE_1
where
template_id=#id#
end;
</insert>
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics