From acde3cb63e1c54bd827d81e9ccd6ac9c8af8307b Mon Sep 17 00:00:00 2001 From: bernd Date: Wed, 14 Nov 2012 21:24:31 +0100 Subject: [PATCH 07/25] Fix off-by-one error (leading to a SQLException) when updating a field with null. --- eodsql/src/net/lemnik/eodsql/spi/util/DefaultDataObjectBinding.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.8.0