Mercurial > dive4elements > river
changeset 3291:b52c4b34ec1b
SQ relation: Do not store null values from database.
flys-artifacts/trunk@4959 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 12 Jul 2012 20:29:05 +0000 |
parents | 36f3b53d5cfc |
children | e06036fdf0c7 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Jul 12 17:34:40 2012 +0000 +++ b/flys-artifacts/ChangeLog Thu Jul 12 20:29:05 2012 +0000 @@ -1,3 +1,8 @@ +2012-07-12 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java: + Do not store null values from database. + 2012-07-12 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/model/sq/Measurements.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java Thu Jul 12 17:34:40 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java Thu Jul 12 20:29:05 2012 +0000 @@ -50,7 +50,9 @@ public Object transformTuple(Object [] tuple, String [] aliases) { Map<String, Object> map = new HashMap<String, Object>(); for (int i = 0; i < tuple.length; ++i) { - map.put(aliases[i], tuple[i]); + if (tuple[i] != null) { + map.put(aliases[i], tuple[i]); + } } return new Measurement(map); }