[mapguide-commits] r7607 - branches/2.5/MgDev/Desktop/MgDesktop/Services/Feature/Commands

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jun 11 07:03:29 PDT 2013


Author: jng
Date: 2013-06-11 07:03:29 -0700 (Tue, 11 Jun 2013)
New Revision: 7607

Modified:
   branches/2.5/MgDev/Desktop/MgDesktop/Services/Feature/Commands/DescribeSchema.cpp
Log:
mg-desktop: Having multiple extended feature classes of the same name will trip up bulk identity property loading of a MgMapBase-derived class. Although technically this shouldn't happen (as extended class names should be unique and authoring tools should be guarding against this), this submission adds a safeguard against this by bailing out of the extension loop once identity properties have been found, preventing subsequent classes of the same name (that shouldn't happen) from triggering MgDuplicateObjectExceptions if found when the loop is continued.

Modified: branches/2.5/MgDev/Desktop/MgDesktop/Services/Feature/Commands/DescribeSchema.cpp
===================================================================
--- branches/2.5/MgDev/Desktop/MgDesktop/Services/Feature/Commands/DescribeSchema.cpp	2013-06-11 13:37:05 UTC (rev 7606)
+++ branches/2.5/MgDev/Desktop/MgDesktop/Services/Feature/Commands/DescribeSchema.cpp	2013-06-11 14:03:29 UTC (rev 7607)
@@ -1445,6 +1445,10 @@
                     {
                         extensionFeatureClass = (STRING)extension->GetFeatureClass();
                         GetIdentityProperties(extensionFeatureClass, currClass.p, idProps.p);
+                        //Break because
+                        // a) We've found and processed our extended class
+                        // b) Guards against duplicate extended classes of the same name defined in the Feature Source. Authoring tools *should not* let this happen
+                        break;
                     }
                 }
             }



More information about the mapguide-commits mailing list