[mapguide-users] BUG in SQL Server Spatial FDO provider when using filter in MG Layer

Srecko Lipovsek srecko.lipovsek at kaliopa.si
Tue Apr 23 03:21:13 PDT 2013


Don't know if this is right place, but this affect MG ii frst place as well.

I think I found huge BUG in SQL Server Spatial FDO driver (maybe in Generic
Rdbms) when using filter in MG 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 ...

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-in-MG-Layer-tp5049048.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list