Announcement Announcement Module
Collapse
No announcement yet.
set an Integer array as query parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • set an Integer array as query parameter

    Somebody knows how can I set an integer array as paramenter in jdbctemplate ?

    I have this query :

    sql = select * from depto where id_depto in ( ? )

    and I want to set an int array with some ids,

    array = (1,2,3,4)

    getSimpleJdbcTemplate()
    .query(sql,
    DeptoMapper,
    new Object[]{array}
    );

    but that is incorret,

    Thanks
Working...
X