[fdo-users] BUG in SQL Server Spatial FDO provider when using filter to Query Data
Srecko Lipovsek
srecko.lipovsek at kaliopa.si
Tue Apr 23 05:35:37 PDT 2013
I think I found huge BUG in SQL Server Spatial FDO driver (maybe in Generic
Rdbms) when using filter in MapGuide layer (the same when using theme on
layer, where filters are also present).
When filter is present FDO creates SQL query, where filter text should be in
brackets (especially when using OR in filter text), but it is not!?
Example:
Filter in MG layer: IMPORT_OB_ID=184 OR IMPORT_OB_ID=189
FDO generates SQL Query like this:
SELECT A.IMPORT_OB_ID,A.SPATIAL_GEOMETRY FROM dbo.KAT_PD_GRAF AS A
WHERE A.IMPORT_OB_ID=184 OR A.IMPORT_OB_ID=189
AND A.[SPATIAL_GEOMETRY].STIntersects(convert(geometry, @P1).STEnvelope())=1
Filter text should be in brackets:
SELECT A.IMPORT_OB_ID,A.SPATIAL_GEOMETRY FROM dbo.KAT_PD_GRAF AS A
WHERE *(*A.IMPORT_OB_ID=184 OR A.IMPORT_OB_ID=189*)*
AND A.[SPATIAL_GEOMETRY].STIntersects(convert(geometry, @P1).STEnvelope())=1
Same is also in PostGis FDO driver so I supose there is defect in Generic
Rdbms ...
Tested in MGOS 2.4 (FDO 3.7) and MGOS 2.5 (FDO 3.8).
Could please somebody check.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/BUG-in-SQL-Server-Spatial-FDO-provider-when-using-filter-to-Query-Data-tp5049097.html
Sent from the FDO Users mailing list archive at Nabble.com.
More information about the fdo-users
mailing list