How to pass an Integer Array to IN clause in MyBatis

前端 未结 4 1331
旧巷少年郎
旧巷少年郎 2020-12-01 05:39

There is a query in my Mybatis containing an IN clause which is basically a set of Id\'s ( Integers)

I am now stuck on how can I pass an Integer array to this IN cla

4条回答
  •  粉色の甜心
    2020-12-01 05:55

    List distinctID = (List) getSqlSession().selectOne("dataMapper.getUniqueData", uniqueIDList);
    

    Send the list of unique id

    
    

    When using an List, index will be the number of current iteration and value item will be the element retrieved in this iteration

提交回复
热议问题