Carsten Klein created an issue |
Different handling of empty strings and NULL values passed through WFS-T update requests |
Issue Type: |
Bug |
---|---|
Affects Versions: |
2.14.0 |
Assignee: |
Unassigned |
Components: |
WFS |
Created: |
24/Oct/18 12:38 PM |
Environment: |
Java 8 (both OpenJDK and Oracle), Apache Tomcat 7 or Apache Tomcat 8.5, PostgreSQL 9.3 (Linux), Ubuntu Linux, Windows 8.1 |
Priority: |
Medium |
Reporter: |
Hi there, current versions of GeoServer seem to handle empty strings and NULL values passed through WFS-T update requests differently than in older versions (2.8.x). We are unable to set fields to an empty string and must change the way we provide NULL values. That used to work with version 2.8.x. After moving to version 2.13.0 some time ago, we encountered the new behavior for the first time. It’s still present in current stable version 2.14.0. Have a look at this WFS-T Update request, which updates some fields in a PostgreSQL database:
As far as I remember, with GeoServer 2.8.x, Now, for columns So, actually NULL values can only be passed by omitting the We’ve run GeoServer 2.14.0 in a local Tomcat server in Eclipse (using prebuilt binaries (JARs) with sources attached) and did some debugging. It turned out, that the parsed request contains empty In XML, an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag, so, there is per se no distinction between these two forms. OGC recommends using an empty value element to represent NULL. If GeoServer has now decided to represent NULL by a missing value element, that’s OK (but not really documented). However, there is still no way to represent an empty string. An empty element would be an option (since it’s not/no longer used to represent NULL). Either way, empty value elements result in GeoServer working with Since the XML request is actually parsed by GeoTools, this may as well be a GEOT issue. Also, AFAIK, this only applies to property values sent with WFS-T Update and (maybe) Insert requests. WFS filters work well with empty Literal strings. |
Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS |
|
This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100094-sha1:052c2c8) |