I want to use list put into query result,database have two data,but there are four results in the list.,why this repeat query
    <select id="selectList" resultType="map" >
        <foreach collection="list" item="items" separator=" union all ">
            SELECT
            #{items.id,jdbcType=INTEGER} id,
            #{items.name,jdbcType=VARCHAR} name
            FROM category
        </foreach>
    </select>
    public void selectList() {
        Map<String, Object> map1 = new HashMap<>();
        map1.put("name", "haha");
        map1.put("id", "1");
        Map<String, Object> map2 = new HashMap<>();
        map2.put("name", "update");
        map2.put("id", "2");
        List<Map<String, Object>> list = new ArrayList<>();
        list.add(map1);
        list.add(map2);
        List<Map<String, Object>> resultList = categoryDao.selectList(list);
        for (Map<String,Object> m : resultList){
            System.out.println(m.toString());
        }
    }
}


Why there are four here?