Fix batch operations sample in reference docs
Remove superfluous code from the sample in section 13.4.3 of the JDBC reference guide. Issue: SPR-9937
This commit is contained in:
@@ -1516,14 +1516,6 @@ dataSource.setPassword("");</programlisting>
|
||||
}
|
||||
|
||||
public int[][] batchUpdate(final Collection<Actor> actors) {
|
||||
Collection<Object[]> batch = new ArrayList<Object[]>();
|
||||
for (Actor actor : actors) {
|
||||
Object[] values = new Object[] {
|
||||
actor.getFirstName(),
|
||||
actor.getLastName(),
|
||||
actor.getId()};
|
||||
batch.add(values);
|
||||
}
|
||||
int[][] updateCounts = jdbcTemplate.batchUpdate(
|
||||
"update t_actor set first_name = ?, last_name = ? where id = ?",
|
||||
actors,
|
||||
|
||||
Reference in New Issue
Block a user