Announcement Announcement Module
No announcement yet.
NamedParameterJdbcTemplate support for batch updates Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • NamedParameterJdbcTemplate support for batch updates

    The NamedParameterJdbcTemplate does it support batch updates like JDBCTemplate ?

  • #2
    According to this is just a wrapper around the normal JdbcTemplate. The underlying JdbcTemplate instance can be accessed via the getJdbcOperations() accessor of the NamedParameter counterpart.

    The docs just say that named placeholders are replaced with traditional ? placeholders at execution time. My guess is that because you'd have to set the batch SQL statements in the JdbcTemplate, interpolation of named placeholders would not occur. There would have to be a batch version in NamedParameter that performs validation and interpolation and then calls JdbcTemplate's batch*() method appropriately. I haven't confirmed this by looking at the code, but I think it's safe to say the answer is no.

    Hope that helps (and someone from SpringSource, please correct me if I'm wrong).