[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapguide-commits
Subject:    [mapguide-commits] r6800 - in trunk/Tools/Maestro: OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroA
From:       svn_mapguide () osgeo ! org
Date:       2012-06-21 15:52:56
Message-ID: 20120621155256.90F2D390313 () trac ! osgeo ! org
[Download RAW message or body]

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);
             }
         }
 

_______________________________________________
mapguide-commits mailing list
mapguide-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic