[Fdo-trac] [fdo-trac] #889: SQLServerSpatial removes parenthesis in filters
FDO
trac_fdo at osgeo.org
Wed May 7 10:52:38 PDT 2014
#889: SQLServerSpatial removes parenthesis in filters
---------------------------------+------------------------------------------
Reporter: beginbenoit | Owner: danstoica
Type: defect | Status: new
Priority: major | Milestone: 3.8.0
Component: SQLServer Spatial | Version: 3.8.0
Severity: 1 | Keywords:
External_id: |
---------------------------------+------------------------------------------
The SQLServerSpatial provider removes parenthesis that are not used for an
IN clause. This causes major issues with the actual clause logic not being
applied properly if you use any OR operators.
For exemple, if you set a filter such as "(ColumnA = '1' OR ColumnA = '2')
AND ColumnB = '3'", the resulting filter will not have the parenthesis and
the logic becomes completely broken.
This creates an issue in software such as Mapguide when you use the API.
If you also apply a spatial filter. Without any parenthesis anywhere, the
query does not respect the logic.
To validate that it is a provider specific issue, I tested the same filter
and API manipulation against the SDF provider and it returns the proper
records for my filter logic.
To reproduce the issue, I simply used FDO Toolbox 1.2.0.1267 and ran the
same query on an SQL Server table and an SDF. The query returns the proper
results for the SDF provider, but the SQL Server provider does not.
I also confirmed using the API directly. I create an ISelect on an SQL
Server provider, set the filter and then inspect the filter via debugging
and notice my parenthesis have dissapeared.
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/889>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list