[fdo-commits] r757 - in branches/3.2.x/Providers/GenericRdbms: Inc/Rdbms/Override Src/MySQL/SchemaMgr/Lp Src/MySQL/SchemaMgr/Ph Src/SchemaMgr/Lp Src/SchemaMgr/Ov Src/SchemaMgr/Ph Src/UnitTest Src/UnitTest/Common

svn_fdo at osgeo.org svn_fdo at osgeo.org
Thu Feb 15 15:11:54 EST 2007


Author: brentrobinson
Date: 2007-02-15 15:11:54 -0500 (Thu, 15 Feb 2007)
New Revision: 757

Modified:
   branches/3.2.x/Providers/GenericRdbms/Inc/Rdbms/Override/RdbmsOvGeometricPropertyDefinition.h
   branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Lp/GeometricPropertyDefinition.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.h
   branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.h
   branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/ObjectPropertyDefinition.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/PropertyMappingConcrete.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ov/RdbmsOvGeometricPropertyDefinition.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ph/Mgr.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer2005_master.txt
   branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer_master.txt
Log:
Views support - Aligned MySql Schema Manager pkey reading with that of base classes. Fixed various memory leaks.

Modified: branches/3.2.x/Providers/GenericRdbms/Inc/Rdbms/Override/RdbmsOvGeometricPropertyDefinition.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Inc/Rdbms/Override/RdbmsOvGeometricPropertyDefinition.h	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Inc/Rdbms/Override/RdbmsOvGeometricPropertyDefinition.h	2007-02-15 20:11:54 UTC (rev 757)
@@ -110,7 +110,7 @@
     FDORDBMS_OV_API virtual void _writeXmlContents(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
 
 private:
-    FdoRdbmsOvGeometricColumn* mColumn;
+    FdoPtr<FdoRdbmsOvGeometricColumn> mColumn;
     FdoSmOvGeometricColumnType  mGeometricColumnType;
     FdoSmOvGeometricContentType mGeometricContentType;
     FdoStringP                     mXColumnName;

Modified: branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Lp/GeometricPropertyDefinition.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Lp/GeometricPropertyDefinition.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Lp/GeometricPropertyDefinition.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -142,12 +142,12 @@
     FdoMySQLOvGeometricPropertyDefinition* mqlGeomPropOverrides = dynamic_cast<FdoMySQLOvGeometricPropertyDefinition*>(pPropOverrides);
     if (mqlGeomPropOverrides)
     {
-        FdoMySQLOvGeometricColumn* mqlGeomColOverrides = mqlGeomPropOverrides->GetColumn();
+        FdoMySQLOvGeometricColumnP mqlGeomColOverrides = mqlGeomPropOverrides->GetColumn();
         if (mqlGeomColOverrides)
         {
             // Handle mappings for new objects or ones that originated from FDO config doc.
             if ( (elementState == FdoSchemaElementState_Added) || GetIsFromFdo() ) {
-                // no SQL Server-specific mappings to update, currently.
+                // no MySQL-specific mappings to update, currently.
             }
             else
             {

Modified: branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -20,6 +20,8 @@
 #include "DbObject.h"
 #include "Owner.h"
 #include "Rd/ColumnReader.h"
+#include "Rd/PkeyReader.h"
+#include "Rd/FkeyReader.h"
 #include "ColumnChar.h"
 #include "ColumnBool.h"
 #include "ColumnByte.h"
@@ -396,7 +398,20 @@
     return new FdoSmPhRdMySqlColumnReader( GetManager(), FDO_SAFE_ADDREF(this) );
 }
 
+FdoPtr<FdoSmPhRdPkeyReader> FdoSmPhMySqlDbObject::CreatePkeyReader() const
+{
+    FdoSmPhMySqlDbObject* pDbObject = (FdoSmPhMySqlDbObject*) this;
 
+    return new FdoSmPhRdMySqlPkeyReader( pDbObject->GetManager(), FDO_SAFE_ADDREF(pDbObject) );
+}
+
+FdoPtr<FdoSmPhRdFkeyReader> FdoSmPhMySqlDbObject::CreateFkeyReader() const
+{
+    FdoSmPhMySqlDbObject* pDbObject = (FdoSmPhMySqlDbObject*) this;
+
+    return new FdoSmPhRdMySqlFkeyReader( pDbObject->GetManager(), FDO_SAFE_ADDREF(pDbObject) );
+}
+
 MySQLOvStorageEngineType FdoSmPhMySqlDbObject::StorageEngineStringToEnum(FdoString* storageEngine)
 {
     MySQLOvStorageEngineType ret;

Modified: branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.h	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/DbObject.h	2007-02-15 20:11:54 UTC (rev 757)
@@ -218,8 +218,10 @@
         FdoSmPhRdColumnReader* colRdr = NULL
     );
 
-    // Column reader creator implementation.
+    // Implementations for creating column, primary key and foreign key readers
     virtual FdoPtr<FdoSmPhRdColumnReader> CreateColumnReader();
+    virtual FdoPtr<FdoSmPhRdPkeyReader> CreatePkeyReader() const;
+    virtual FdoPtr<FdoSmPhRdFkeyReader> CreateFkeyReader() const;
 
 private:
 	FdoStringP mAutoIncrementColumnName;

Modified: branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -20,8 +20,6 @@
 #include "Table.h"
 #include "Owner.h"
 #include "Mgr.h"
-#include "Rd/PkeyReader.h"
-#include "Rd/FkeyReader.h"
 #include "Rd/ConstraintReader.h"
 #include "Rd/IndexReader.h"
 
@@ -52,20 +50,6 @@
     // (these engines do support transactions).
 }
 
-FdoPtr<FdoSmPhRdPkeyReader> FdoSmPhMySqlTable::CreatePkeyReader() const
-{
-    FdoSmPhMySqlTable* pTable = (FdoSmPhMySqlTable*) this;
-
-    return new FdoSmPhRdMySqlPkeyReader( pTable->GetManager(), FDO_SAFE_ADDREF(pTable) );
-}
-
-FdoPtr<FdoSmPhRdFkeyReader> FdoSmPhMySqlTable::CreateFkeyReader() const
-{
-    FdoSmPhMySqlTable* pTable = (FdoSmPhMySqlTable*) this;
-
-    return new FdoSmPhRdMySqlFkeyReader( pTable->GetManager(), FDO_SAFE_ADDREF(pTable) );
-}
-
 FdoPtr<FdoSmPhRdIndexReader> FdoSmPhMySqlTable::CreateIndexReader() const
 {
     FdoSmPhMySqlTable* pTable = (FdoSmPhMySqlTable*) this;

Modified: branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.h	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/MySQL/SchemaMgr/Ph/Table.h	2007-02-15 20:11:54 UTC (rev 757)
@@ -24,8 +24,8 @@
 
 #include "DbObject.h"
 #include "../../../SchemaMgr/Ph/Table.h"
-#include "Fkey.h"
 #include "Index.h"
+#include "Fkey.h"
 
 // MySql Provider implementation of a Table.
 // Represents an MySql schema (user)
@@ -54,10 +54,8 @@
     // No lock types currently supported in MySql.
 	virtual const FdoLockType* GetLockTypes(FdoInt32& size) const;
 
-    // Implementations for creating primary key, foreign key and
+    // Implementations for creating constraint and
     // index readers.
-    virtual FdoPtr<FdoSmPhRdPkeyReader> CreatePkeyReader() const;
-    virtual FdoPtr<FdoSmPhRdFkeyReader> CreateFkeyReader() const;
     virtual FdoPtr<FdoSmPhRdConstraintReader> CreateConstraintReader( FdoString* type ) const;
     virtual FdoPtr<FdoSmPhRdIndexReader> CreateIndexReader() const;
 

Modified: branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/ObjectPropertyDefinition.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/ObjectPropertyDefinition.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/ObjectPropertyDefinition.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -149,7 +149,7 @@
 
     // Extract the physical overrides
     if ( pObjectPropOverrides ) {
-        mMappingOverrides = FDO_SAFE_ADDREF(pObjectPropOverrides->GetMappingDefinition());
+        mMappingOverrides = pObjectPropOverrides->GetMappingDefinition();
 
         FdoRdbmsOvPropertyMappingSingleP singleMapping =
             FDO_SAFE_ADDREF(dynamic_cast<FdoRdbmsOvPropertyMappingSingle*>(mMappingOverrides.p));

Modified: branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/PropertyMappingConcrete.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/PropertyMappingConcrete.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Lp/PropertyMappingConcrete.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -46,7 +46,7 @@
                         pParentType, 
                         this, 
                         FdoSmLpPropertyMappingType_Concrete, 
-                        pConcreteOverrides ? pConcreteOverrides->GetInternalClass() : NULL
+                        pConcreteOverrides ? FdoRdbmsOvClassP(pConcreteOverrides->GetInternalClass()) : FdoRdbmsOvClassP()
                    ) 
         );
 	}

Modified: branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ov/RdbmsOvGeometricPropertyDefinition.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ov/RdbmsOvGeometricPropertyDefinition.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ov/RdbmsOvGeometricPropertyDefinition.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -25,7 +25,6 @@
 
 FdoRdbmsOvGeometricPropertyDefinition::FdoRdbmsOvGeometricPropertyDefinition()
 :
-    mColumn(NULL),
     mGeometricColumnType(FdoSmOvGeometricColumnType_Default),
     mGeometricContentType(FdoSmOvGeometricContentType_Default)
 {
@@ -33,7 +32,6 @@
 
 FdoRdbmsOvGeometricPropertyDefinition::FdoRdbmsOvGeometricPropertyDefinition(FdoString* name)
 :
-    mColumn(NULL),
     FdoRdbmsOvPropertyDefinition(name),
     mGeometricColumnType(FdoSmOvGeometricColumnType_Default),
     mGeometricContentType(FdoSmOvGeometricContentType_Default)

Modified: branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ph/Mgr.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ph/Mgr.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/SchemaMgr/Ph/Mgr.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -116,31 +116,27 @@
         
             // Table is not in any table list so check if it matches the table prefix
 
-            // Keyless objects are skipped unless explicitly referenced
-            // by the table list.
-            if ( hasKey ) {
-                // Not in the list so check if it starts with the table prefix
+            // Not in the list so check if it starts with the table prefix
 
-                FdoStringP tablePrefix = autoGen->GetGenTablePrefix();
+            FdoStringP tablePrefix = autoGen->GetGenTablePrefix();
 
-                if ( tablePrefix != L"" ) {
-                    if ( tableName.Mid( 0, tablePrefix.GetLength()).ICompare(tablePrefix) == 0 ) {
-                        // Table name starts with the prefix. Remove prefix to generate class name
-                        // if directed to do so.
-                        if ( autoGen->GetRemoveTablePrefix() )
-                            className = tableName.Mid( tablePrefix.GetLength(), 9999 );
-                        else
-                            className = tableName;
-                    }
-                }
-                else {
-                    if ( tableList->GetCount() == 0 ) {
-                        // Special case. If table list is empty and table prefix blank then 
-                        // always reverse-engineer this table.
+            if ( tablePrefix != L"" ) {
+                if ( tableName.Mid( 0, tablePrefix.GetLength()).ICompare(tablePrefix) == 0 ) {
+                    // Table name starts with the prefix. Remove prefix to generate class name
+                    // if directed to do so.
+                    if ( autoGen->GetRemoveTablePrefix() )
+                        className = tableName.Mid( tablePrefix.GetLength(), 9999 );
+                    else
                         className = tableName;
-                    }
                 }
             }
+            else {
+                if ( tableList->GetCount() == 0 ) {
+                    // Special case. If table list is empty and table prefix blank then 
+                    // always reverse-engineer this table.
+                    className = tableName;
+                }
+            }
         }
     }
 

Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoApplySchemaTest.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -713,6 +713,7 @@
 			false,
             DB_NAME_FOREIGN_SUFFIX
 		);
+
     }
 	catch ( FdoException* e ) 
 	{
@@ -5331,7 +5332,7 @@
     mapping->SetPrefix( L"FLRC" );
 
     pClass = CreateOvClassDefinition( L"OneForeign" );
-    ClassOvSetTable( pClass, CreateOvTable(L"oneforeign") );
+    ClassOvSetTable( pClass, FdoRdbmsOvTableP(CreateOvTable(L"oneforeign")) );
     ClassesOvAdd(pOverrides, pClass);
 
     return pOverrides;
@@ -5862,7 +5863,7 @@
         }
     }
         
-	insertCommand->Execute();
+	FdoPtr<FdoIFeatureReader> rdr = insertCommand->Execute();
 
     trans->Commit();
     FDO_SAFE_RELEASE(trans);

Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.cpp	2007-02-15 20:11:54 UTC (rev 757)
@@ -1800,9 +1800,11 @@
         owner->SetPassword( L"test" );
 
         CreateExternalTable( owner, table_id_geom, true, m_hasGeom, m_hasAssoc );
+        CreateExternalView( owner, L"VIEW_ID_GEOM", table_id_geom, true, m_hasGeom, false );
         CreateExternalTable( owner, L"TABLE_NOID_GEOM", false, m_hasGeom, false );
         CreateExternalTable( owner, table_noid_nogeom, false, false, false );
 
+
         owner->Commit();
 
         connection = UnitTestUtil::CreateConnection(
@@ -1854,19 +1856,23 @@
         // Select and verify all data (post-update state).
 
         SelectNoMetaAll( connection, phMgr, table_id_geom, m_hasGeom, m_hasAssoc );
+        SelectNoMetaAll( connection, phMgr, L"VIEW_ID_GEOM", m_hasGeom, false );
         SelectNoMetaAll( connection, phMgr, L"TABLE_NOID_GEOM", m_hasGeom, false );
         SelectNoMetaAll( connection, phMgr, table_noid_nogeom, false, false );
 
         SelectNoMetaFilter( connection, phMgr, table_id_geom, m_hasGeom, m_hasAssoc );
+        SelectNoMetaFilter( connection, phMgr, L"VIEW_ID_GEOM", m_hasGeom, false );
         SelectNoMetaFilter( connection, phMgr, L"TABLE_NOID_GEOM", m_hasGeom, false );
         SelectNoMetaFilter( connection, phMgr, table_noid_nogeom, false, false );
 
         SelectNoMetaProps( connection, phMgr, table_id_geom, m_hasGeom );
+        SelectNoMetaProps( connection, phMgr, L"VIEW_ID_GEOM", m_hasGeom );
         SelectNoMetaProps( connection, phMgr, L"TABLE_NOID_GEOM", m_hasGeom );
         SelectNoMetaProps( connection, phMgr, table_noid_nogeom, false );
 
 #ifndef RDBI_DEF_SSQL
 		SelectNoMetaSpatial( connection, phMgr, table_id_geom, m_hasAssoc );
+		SelectNoMetaSpatial( connection, phMgr, L"VIEW_ID_GEOM", false );
 		SelectNoMetaSpatial( connection, phMgr, L"TABLE_NOID_GEOM", false );
 #endif
 
@@ -1942,6 +1948,27 @@
     }
 }
 
+void FdoUpdateTest::CreateExternalView( FdoSmPhOwnerP owner, FdoStringP viewName, FdoStringP tableName, bool hasKey, bool hasGeom, bool hasAssoc )
+{
+    FdoSmPhMgrP phMgr = owner->GetManager();
+
+    FdoSmPhViewP view = owner->CreateView( phMgr->GetDcDbObjectName(viewName), L"", owner->GetName(), phMgr->GetDcDbObjectName(tableName) );
+    
+    FdoStringP columnName = phMgr->GetDcColumnName(L"KEY1");
+    FdoSmPhColumnP column = view->CreateColumnChar( columnName, false, 10, columnName );
+    
+    columnName = phMgr->GetDcColumnName(Key2ColName());
+    FdoSmPhColumnP fkColumn = view->CreateColumnChar( columnName, false, 10, columnName );
+
+    if ( hasGeom ) {
+        columnName = phMgr->GetDcColumnName(L"GEOMETRY");
+        column = view->CreateColumnGeom( columnName, (FdoSmPhScInfo*) NULL, true, false, false, columnName );
+    }
+
+    columnName = phMgr->GetDcColumnName(ValueColName());
+    column = view->CreateColumnChar( columnName, true, 20, columnName );
+}
+
 void FdoUpdateTest::CreateExternalData( FdoPtr<FdoIConnection> connection, FdoSmPhMgrP phMgr, FdoStringP tableName, bool hasGeom, bool hasAssoc )
 {
 

Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/Common/FdoUpdateTest.h	2007-02-15 20:11:54 UTC (rev 757)
@@ -59,6 +59,7 @@
     virtual void  set_provider() {};   
 
     void CreateExternalTable( FdoSmPhOwnerP owner, FdoStringP tableName, bool hasKey, bool hasGeom, bool hasAssoc );
+    void CreateExternalView( FdoSmPhOwnerP owner, FdoStringP viewName, FdoStringP tableName, bool hasKey, bool hasGeom, bool hasAssoc );
     void CreateExternalData( FdoPtr<FdoIConnection> connection, FdoSmPhMgrP phMgr, FdoStringP tableName, bool hasGeom, bool hasAssoc );
     void SelectNoMetaAll( FdoPtr<FdoIConnection> connection, FdoSmPhMgrP phMgr, FdoStringP tableName, bool hasGeom, bool hasAssoc );
     void SelectNoMetaFilter( FdoPtr<FdoIConnection> connection, FdoSmPhMgrP phMgr, FdoStringP tableName, bool hasGeom, bool hasAssoc );

Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer2005_master.txt
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer2005_master.txt	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer2005_master.txt	2007-02-15 20:11:54 UTC (rev 757)
@@ -677,10 +677,18 @@
 </xs:extension>
 </xs:complexContent>
 </xs:complexType>
+<xs:element name="view1" type="dbo:view1Type" abstract="false" substitutionGroup="gml:_Feature">
+<xs:key name="view1Key">
+<xs:selector xpath=".//view1"/>
+<xs:field xpath="ID"/>
+</xs:key>
+</xs:element>
 <xs:complexType name="view1Type" abstract="false">
 <xs:annotation>
 <xs:documentation/>
 </xs:annotation>
+<xs:complexContent>
+<xs:extension base="fdo:ClassType">
 <xs:sequence>
 <xs:element name="BYTE_COLUMN" minOccurs="0">
 <xs:simpleType>
@@ -710,11 +718,21 @@
 </xs:annotation>
 </xs:element>
 </xs:sequence>
+</xs:extension>
+</xs:complexContent>
 </xs:complexType>
+<xs:element name="view3" type="dbo:view3Type" abstract="false" substitutionGroup="gml:_Feature">
+<xs:key name="view3Key">
+<xs:selector xpath=".//view3"/>
+<xs:field xpath="ID"/>
+</xs:key>
+</xs:element>
 <xs:complexType name="view3Type" abstract="false">
 <xs:annotation>
 <xs:documentation/>
 </xs:annotation>
+<xs:complexContent>
+<xs:extension base="fdo:ClassType">
 <xs:sequence>
 <xs:element name="GEOM_COLUMN" minOccurs="0">
 <xs:simpleType>
@@ -751,6 +769,8 @@
 </xs:simpleType>
 </xs:element>
 </xs:sequence>
+</xs:extension>
+</xs:complexContent>
 </xs:complexType>
 </xs:schema>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://fdo.osgeo.org/schemas/feature/guest" xmlns:fdo="http://fdo.osgeo.org/schemas" xmlns:gml="http://www.opengis.net/gml" xmlns:guest="http://fdo.osgeo.org/schemas/feature/guest" elementFormDefault="qualified" attributeFormDefault="unqualified">
@@ -1832,6 +1852,12 @@
 <complexType name="table7Type" identityIsGloballyUnique="false" identitySeed="1" identityIncrement="1" identityPropertyName="ID">
 <Table tableFilegroup="PRIMARY" textInRow="NotInRow" pkeyName="pk_dbo_table7" name="dbo.table7"/>
 </complexType>
+<complexType name="view1Type" identityIsGloballyUnique="false" identitySeed="0" identityIncrement="0" identityPropertyName="">
+<Table tableFilegroup="PRIMARY" textInRow="NotInRow" pkeyName="pk_dbo_view1" name="dbo.view1"/>
+</complexType>
+<complexType name="view3Type" identityIsGloballyUnique="false" identitySeed="0" identityIncrement="0" identityPropertyName="">
+<Table tableFilegroup="PRIMARY" textInRow="NotInRow" pkeyName="pk_dbo_view3" name="dbo.view3"/>
+</complexType>
 </SchemaMapping>
 <SchemaMapping xmlns:rdb="http://fdordbms.osgeo.org/schemas" xmlns="http://www.autodesk.com/isd/fdo/SqlServerProvider" textInRow="NotInRow" provider="Autodesk.SqlServer.3.2" name="guest">
 <complexType name="vertable1Type" identityIsGloballyUnique="false" identitySeed="0" identityIncrement="0" identityPropertyName="">

Modified: branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer_master.txt
===================================================================
--- branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer_master.txt	2007-02-15 19:00:17 UTC (rev 756)
+++ branches/3.2.x/Providers/GenericRdbms/Src/UnitTest/gen_default1_SqlServer_master.txt	2007-02-15 20:11:54 UTC (rev 757)
@@ -677,10 +677,18 @@
 </xs:extension>
 </xs:complexContent>
 </xs:complexType>
+<xs:element name="view1" type="dbo:view1Type" abstract="false" substitutionGroup="gml:_Feature">
+<xs:key name="view1Key">
+<xs:selector xpath=".//view1"/>
+<xs:field xpath="ID"/>
+</xs:key>
+</xs:element>
 <xs:complexType name="view1Type" abstract="false">
 <xs:annotation>
 <xs:documentation/>
 </xs:annotation>
+<xs:complexContent>
+<xs:extension base="fdo:ClassType">
 <xs:sequence>
 <xs:element name="BYTE_COLUMN" minOccurs="0">
 <xs:simpleType>
@@ -710,11 +718,21 @@
 </xs:annotation>
 </xs:element>
 </xs:sequence>
+</xs:extension>
+</xs:complexContent>
 </xs:complexType>
+<xs:element name="view3" type="dbo:view3Type" abstract="false" substitutionGroup="gml:_Feature">
+<xs:key name="view3Key">
+<xs:selector xpath=".//view3"/>
+<xs:field xpath="ID"/>
+</xs:key>
+</xs:element>
 <xs:complexType name="view3Type" abstract="false">
 <xs:annotation>
 <xs:documentation/>
 </xs:annotation>
+<xs:complexContent>
+<xs:extension base="fdo:ClassType">
 <xs:sequence>
 <xs:element name="GEOM_COLUMN" minOccurs="0">
 <xs:simpleType>
@@ -751,6 +769,8 @@
 </xs:simpleType>
 </xs:element>
 </xs:sequence>
+</xs:extension>
+</xs:complexContent>
 </xs:complexType>
 </xs:schema>
 <SchemaMapping xmlns:rdb="http://fdordbms.osgeo.org/schemas" xmlns="http://www.autodesk.com/isd/fdo/SqlServerProvider" textInRow="NotInRow" provider="Autodesk.SqlServer.3.2" name="dbo">
@@ -775,5 +795,11 @@
 <complexType name="table7Type" identityIsGloballyUnique="false" identitySeed="1" identityIncrement="1" identityPropertyName="ID">
 <Table tableFilegroup="PRIMARY" textInRow="NotInRow" pkeyName="pk_dbo_table7" name="dbo.table7"/>
 </complexType>
+<complexType name="view1Type" identityIsGloballyUnique="false" identitySeed="0" identityIncrement="0" identityPropertyName="">
+<Table tableFilegroup="PRIMARY" textInRow="NotInRow" pkeyName="pk_dbo_view1" name="dbo.view1"/>
+</complexType>
+<complexType name="view3Type" identityIsGloballyUnique="false" identitySeed="0" identityIncrement="0" identityPropertyName="">
+<Table tableFilegroup="PRIMARY" textFilegroup="PRIMARY" textInRow="NotInRow" pkeyName="pk_dbo_view3" name="dbo.view3"/>
+</complexType>
 </SchemaMapping>
 </fdo:DataStore>



More information about the fdo-commits mailing list