<foreach item="dataCore" collection="list" separator="," >
(#{dataCore.event_id}, #{dataCore.start_time_val},#{dataCore.end_time_val}...)
</foreach>
- and try passing an object or a map as a parameter with the list inside it
two hints:
- you do not need the open/close attributes<foreach item="dataCore" collection="list" separator="," >
(#{dataCore.event_id}, #{dataCore.start_time_val},#{dataCore.end_time_val}...)
</foreach>- and try passing an object or a map as a parameter with the list inside it
El día 6 de abril de 2012 00:1
A batch is when you execute the same statement multiple times. I
think that's what you probably want to do in this case. So rewrite
your SQL so it only inserts a single row, then call the insert
repeatedly in a loop in your Java service layer. (In other words - no
<foreach> in your XML).
Jeff Butler