Is there a way to get multiple rows using Spring's jdbc template that is fail safe? Something like in this post: https://stackoverflow.com/a/1327222/1321514
Set<Integer> ids = ...;
MapSqlParameterSource parameters = new MapSqlParameterSource();
parameters.addValue("ids", ids);
List<Foo> foo = getJdbcTemplate().query("SELECT * FROM foo WHERE a IN (:ids)",
getRowMapper(), parameters);
But being able to return all the ids regardless the DB's limit for the number of parameters. So if the DB can only accept 2000 parameters within the IN clause and I'm passing 2001 I get the 2001 records.