Postgis -- FID columns not being escaped
----------------------------------------

         Key: GEOT-734
         URL: http://jira.codehaus.org/browse/GEOT-734
     Project: GeoTools
        Type: Bug
  Components: postgis  
 Reporter: dblasby
 Assigned to: Chris Holmes 


[EMAIL PROTECTED]:


Hi guys,
 I have a postgis datastore in GeoServer 1.3.0-RC4.SP1.
 Trying to send the following request:

<?xml version="1.0" encoding="iso-8859-1"?>

<GetFeature outputFormat="GML2" xmlns:gml="http://www.opengis.net/gml";>
<Query typeName="NURC:Main">
<PropertyName>/Main/Source</PropertyName>
<PropertyName>/Main/Year</PropertyName>
<Filter>
<And>
<FeatureId fid="234"/>
<BBOX>
<PropertyName>/Main/the_geom</PropertyName>
<gml:Box>
<gml:coord>
<gml:X>1</gml:X>
<gml:Y>40</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>12</gml:X>
<gml:Y>56</gml:Y>
</gml:coord>
</gml:Box>
</BBOX>
<PropertyIsEqualTo>
<PropertyName>/Main/Year</PropertyName>
<Literal>1988</Literal>
</PropertyIsEqualTo>
</And>
</Filter>
</Query>
</GetFeature>

 GeoServer produces the following Exception:

org.geotools.data.DataSourceException: Error Performing SQL query: SELECT
"ID", "Source", "Year" FROM "Main" WHERE ((ID = '234') AND "the_geom" &&
GeometryFromText('POLYGON ((1 40, 1 56, 12 56, 12 40, 1 40))', -1) AND
"Year" = 1988)
....
....
....
Caused by: org.postgresql.util.PSQLException: ERROR: column "id" does not
exist

Infact the SQL string is wrong, it should be:

... FROM "Main" WHERE (("ID" = '234') AND ...

instead of

... FROM "Main" WHERE ((ID = '234') AND ...

 Does anyone knows the cuse?

 Thanks,

Alessio.


-- 
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:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to