Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.6.3
-
Fix Version/s: 1.6.4, 1.7.0-beta1
-
Component/s: WFS
-
Labels:None
-
Number of attachments :
Description
Introducing the prepared statement usage broke one of the cite tests. This is because the wfs request parser generates a string instead of a number, and the string is set directly in the prepared statemetn with no conversion.
If the attribute type is "long" or "double" some conversion must occurr, either in the parser or in the datastore, to account for the type discrepancy.
The test is wfs:wfs-1.1.0-Transaction-tc4.1, the update is
<wfs:Update handle="upd-1" typeName="sf:PrimitiveGeoFeature"> <wfs:Property> <wfs:Name>sf:measurand</wfs:Name> <wfs:Value>286.0</wfs:Value> </wfs:Property> <ogc:Filter> <ogc:PropertyIsEqualTo matchCase="false"> <ogc:PropertyName>gml:name</ogc:PropertyName> <ogc:Literal>cite.gmlsf0-f07</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> </wfs:Update>
The generated query is now:
UPDATE "public"."PrimitiveGeoFeature" SET "measurand" = ? WHERE lower("name") = lower('cite.gmlsf0-f07');
and ? gets replaced with "286.0" instead of new Double(286.0) leading to a database error
Issue Links
| This issue depends upon: | ||||
| GEOT-1809 | Postgis update does not convert attribute values to jdbc type before setting the PreparedStatement value |
|
|
|
The same happens to wfs:wfs-1.1.0-Transaction-tc8.1 for the same reason, the transaction is: