SQL Query is not correctly built
--------------------------------

                 Key: GEOT-2292
                 URL: http://jira.codehaus.org/browse/GEOT-2292
             Project: GeoTools
          Issue Type: Bug
          Components: data jdbc
            Reporter: Jacques LESCOT
         Attachments: DefaultSQLBuilder

I have a case where the DefaultSQLBuilder#sqlColumns(StringBuffer sql, 
FIDMapper mapper, AttributeDescriptor[] attributes) method compute a bad SQL 
statement :
SELECT "ID", FROM LOCATION_POINT

You will notice the extra comma.

Indeed, passed parameters are as follow :
mapper : contains a single "ID" column
AttributeDescriptor[] is an empty but not null array

I have attached a patch that should fix this by adding comma only when 
necessary in the resulting sql statement.

-- 
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:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to