티스토리 뷰

728x90

흔히(?) 쓰이는 mybatis foreach 문은 batch (일괄 처리)가 아니다.

xml에서 쓰이는 <foreach>는 반복되는 여러 sql문장을 단일 sql문으로 만들어주는 구문일 뿐이다.

foreach !== batch 라고 생각하면 곤란하다.

 

stackoverflow에 6년전에 선배님들이 올린 글을 참고

https://stackoverflow.com/questions/32649759/using-foreach-to-do-batch-insert-with-mybatis/40608353

 

using foreach to do batch insert with mybatis

I am using mybatis and i would like to insert an ArrayList to some table. all right using foreach in mapper, well this ends up with oracle exception ORA_00933 . this is the mybatis mapper: <

stackoverflow.com

 

728x90
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함