[mapguide-commits] r9582 - in trunk/MgDev: Server/src/Services/Feature Web/src/HttpHandler
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Jul 26 07:32:52 PDT 2019
Author: jng
Date: 2019-07-26 07:32:52 -0700 (Fri, 26 Jul 2019)
New Revision: 9582
Modified:
trunk/MgDev/Server/src/Services/Feature/WfsQueryAdapter.cpp
trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp
Log:
Fix complete failure of WFS GetFeatures in resultType=hits mode to return a filtered total:
1. We passed the sort criteria (instead of filter) for the WFS filter parameter of GetWfsFeatureTotal()
2. The MgWfsQueryAdapter on the server side did not even assign the MgFeatureQueryOptions that gets built! As a result, FDO queries were always running un-filtered!
Fixes #2800
Modified: trunk/MgDev/Server/src/Services/Feature/WfsQueryAdapter.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/WfsQueryAdapter.cpp 2019-07-23 12:21:39 UTC (rev 9581)
+++ trunk/MgDev/Server/src/Services/Feature/WfsQueryAdapter.cpp 2019-07-26 14:32:52 UTC (rev 9582)
@@ -187,6 +187,9 @@
options->SetOrderingFilter(orderByProperties, orderOption);
}
+
+ m_options = SAFE_ADDREF(options.p);
+
return true;
}
Modified: trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp 2019-07-23 12:21:39 UTC (rev 9581)
+++ trunk/MgDev/Web/src/HttpHandler/HttpWfsGetFeature.cpp 2019-07-26 14:32:52 UTC (rev 9582)
@@ -303,7 +303,7 @@
// Is this hit mode? If so, just request the raw total
if (m_getFeatureParams->IsHitMode())
{
- INT32 total = featureService->GetWfsFeatureTotal(featureSourceId, ((sSchemaHash.size() == 0) ? sClass : sSchemaHash + _(":") + sClass), sSortCriteria, numFeaturesToRetrieve);
+ INT32 total = featureService->GetWfsFeatureTotal(featureSourceId, ((sSchemaHash.size() == 0) ? sClass : sSchemaHash + _(":") + sClass), filter, numFeaturesToRetrieve);
std::string sTotal;
MgUtil::Int32ToString(total, sTotal);
if (sOutputFormat == MgMimeType::Json)
More information about the mapguide-commits
mailing list