From 8bc5d853bbaee2de0d39cf4cde5a560058b17eb4 Mon Sep 17 00:00:00 2001 From: bernd Date: Thu, 4 Aug 2011 02:11:37 +0200 Subject: [PATCH 06/16] Fix off-by-one error (leading to a SQLException) when updating a field with null. --- .../eodsql/spi/util/DefaultDataObjectBinding.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/eodsql/src/net/lemnik/eodsql/spi/util/DefaultDataObjectBinding.java b/eodsql/src/net/lemnik/eodsql/spi/util/DefaultDataObjectBinding.java index 220fdf7..86ee656 100644 --- a/eodsql/src/net/lemnik/eodsql/spi/util/DefaultDataObjectBinding.java +++ b/eodsql/src/net/lemnik/eodsql/spi/util/DefaultDataObjectBinding.java @@ -282,7 +282,7 @@ class DefaultDataObjectBinding extends DataObjectBinding { final Object value = columns[i].get(from); if(value == null) { - results.updateNull(i); + results.updateNull(i + 1); } else { ((TypeMapper)mappers[i]).set(results, i + 1, value); } -- 1.7.6