[mapguide-trac] #1208: SelectFeatures doesn't work if filter is secondary property

MapGuide Open Source trac_mapguide at osgeo.org
Wed Dec 16 02:35:17 EST 2009


#1208: SelectFeatures doesn't work if filter is secondary property
-----------------------------+----------------------------------------------
 Reporter:  christinebao     |         Owner:  Christine Bao
     Type:  defect           |        Status:  new          
 Priority:  medium           |     Milestone:               
Component:  Feature Service  |       Version:  2.1.0        
 Severity:  major            |    Resolution:               
 Keywords:                   |   External_id:  1282026      
-----------------------------+----------------------------------------------
Changes (by christinebao):

 * cc: Bruce, Dechant (added)

Comment:

 == Tech diagnosis: ==

 In r3524 Bruce submitted a patch about "Selection against a joined feature
 source returns an extra feature", which is to fix ticket
 http://trac.osgeo.org/mapguide/ticket/614.

 In this submission, there is a snippet of code added into
 ServerSelectFeatures.cpp:[[BR]]

 {{{

             // Search the filter to see if it contains the extension name
             // If the extension name is not found it means that the filter
 involves attribute(s) only from the primary
             if(NULL != filter)
             {
                 FdoString* filterText = filter->ToString();
                 if(NULL != filterText)
                 {
                     if(NULL == wcsstr(filterText, name.c_str()))
                     {
                         // Add the filter to the query because it only
 applies to the primary
                         query->SetFilter(filter);
                     }
                 }
             }

 }}}
 [[BR]]
 And name is extension name, which is "Join_Extension" in this case.

 The problem is: when property from secondary feature source(such as
 "SecondaryID") comes here, it doesn't contain extension name, so it's
 treated as from primary feature source, thus cause an exception.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1208#comment:1>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list