CITE WFS 1.1 failure after prepared statement usage in postgis data store
-------------------------------------------------------------------------

                 Key: GEOS-1909
                 URL: http://jira.codehaus.org/browse/GEOS-1909
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.6.3
            Reporter: Andrea Aime
            Assignee: Gabriel Roldán
            Priority: Blocker
             Fix For: 1.6.4, 1.7.0-beta1


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 

{code:xml}
<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>
{code}

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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to