Please let me know, how to perform batch insert/update in mybatis using annotated mappers.
you can do it like this:
@Insert({
"<script>",
"insert into mybatis_demo (name, age)",
"values ",
"<foreach collection='dmoList' item='dmo' separator=','>",
"( #{dmo.name,jdbcType=VARCHAR}, #{dmo.age,jdbcType=INTEGER})",
"</foreach>",
"</script>"
})
int insertBatch(@Param("dmoList") List<MybatisDemoDMO> dmoList);