[mapguide-commits] r7399 - trunk/MgDev/Server/src/Services/Feature

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Mar 17 19:41:16 PDT 2013


Author: hubu
Date: 2013-03-17 19:41:16 -0700 (Sun, 17 Mar 2013)
New Revision: 7399

Modified:
   trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp
Log:
Submit on behalf of Andy Zhang.

Fix ticket http://trac.osgeo.org/mapguide/ticket/2230.

It is because the user-defined functions are not added to the functions collection. We need to call FdoIExpressionCapabilities::GetFunctions() explicitly to ensure all user-defined functions are loaded.

Modified: trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp	2013-03-16 17:36:45 UTC (rev 7398)
+++ trunk/MgDev/Server/src/Services/Feature/ServerDescribeSchema.cpp	2013-03-18 02:41:16 UTC (rev 7399)
@@ -56,6 +56,11 @@
         // The reference to the FDO connection from the MgServerFeatureConnection object must be cleaned up before the parent object
         // otherwise it leaves the FDO connection marked as still in use.
         FdoPtr<FdoIConnection> fdoConn = connection->GetConnection();
+
+        // Ensure all user-defined functions are loaded
+        FdoPtr<FdoIExpressionCapabilities> ec = fdoConn->GetExpressionCapabilities();
+        FdoPtr<FdoFunctionDefinitionCollection> funcs = ec->GetFunctions();
+
         FdoPtr<FdoIDescribeSchema> fdoCommand = (FdoIDescribeSchema*)fdoConn->CreateCommand(FdoCommandType_DescribeSchema);
 
         classNameHintUsed = IsClassNameHintUsed(fdoCommand);



More information about the mapguide-commits mailing list