[mapguide-commits] r6800 - in trunk/Tools/Maestro: OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI.Http
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jun 21 08:52:56 PDT 2012
Author: jng
Date: 2012-06-21 08:52:56 -0700 (Thu, 21 Jun 2012)
New Revision: 6800
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs
Log:
#2033: Fix bad implementation of GetClassDefinition due to the #2017 workaround. Turns out the describe schema is the full one if the class name hint is not supported, so returning the first class item is not always the correct one.
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs 2012-06-21 15:00:23 UTC (rev 6799)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/PlatformConnectionBase.cs 2012-06-21 15:52:56 UTC (rev 6800)
@@ -1566,7 +1566,8 @@
if (cls != null)
{
- if (bStoreInCache)
+ var key = resourceID + "!" + cls.QualifiedName; //Sanity check
+ if (bStoreInCache && classCacheKey == key)
{
m_classDefinitionCache[classCacheKey] = cls;
}
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2012-06-21 15:00:23 UTC (rev 6799)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpServerConnection.cs 2012-06-21 15:52:56 UTC (rev 6800)
@@ -1884,7 +1884,10 @@
using (var s = this.OpenRead(req))
{
var fsd = new FeatureSourceDescription(s);
- return fsd.Schemas[0].Classes[0];
+ //We can't just assume first class item is the one, as ones that do not take
+ //class name hints will return the full schema
+ var schema = fsd.Schemas[0];
+ return schema.GetClass(className);
}
}
More information about the mapguide-commits
mailing list