[mybatis] insert, update batch
insert
->しかし、これはテスト用のOKです.実際のサービスではXです.
insert into A(
a,
b)
values
<foreach collection="collection" item="item" index="index" separator=",">
(
#{a},
#{b}
)
</foreach>
update<foreach collection="collection" item="item" index="index" separator=";">
update A
set A = #{A},
B = #{B}
where C = #{C}
</foreach>
updateを使用するには、jdbc設定に「allowMultiQuaries=true」を追加します.->しかし、これはテスト用のOKです.実際のサービスではXです.
Reference
この問題について([mybatis] insert, update batch), 我々は、より多くの情報をここで見つけました https://velog.io/@rosa/mybatis-insert-update-batchテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol