sql - how can i update multiple rows with one query using mybatis and hashmap data type? -


i fetch modified data below.

datatype : hashmap <string, object>   {params=[etc:auth:null chk:0    num:a10000  phone:11    gender:m    id:a10000   dep:pl   name:john   useable:y   , etc:  auth:null   chk:0   num:a20000  phone:123   gender:m     id:a20000   dep:market  name:phillips   useable:y   ]} 

it consist of modified row's column. not modified column.

and want update rows in params @ once. using mybatis

<update id="modifydata" parametertype="java.util.hashmap"> update tablename set      <foreach collection="params" item="one_row" ...>     ...     id = #{one_row.id}     </foreach> 

how can successfully?


Comments