[fdo-commits] r765 - branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Feb 12 15:30:27 EST 2007


Author: brentrobinson
Date: 2007-02-12 15:30:27 -0500 (Mon, 12 Feb 2007)
New Revision: 765

Modified:
   branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/DependencyWriter.cpp
   branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Field.cpp
Log:
Column Field aliasing and fkcardinality type fixes.

Modified: branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/DependencyWriter.cpp
===================================================================
--- branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/DependencyWriter.cpp	2007-02-12 18:26:08 UTC (rev 764)
+++ branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/DependencyWriter.cpp	2007-02-12 20:30:27 UTC (rev 765)
@@ -99,7 +99,7 @@
 
 void FdoSmPhDependencyWriter::SetCardinality(long lValue)
 {
-	SetDouble(L"",L"fkcardinality", lValue);
+	SetLong(L"",L"fkcardinality", lValue);
 }
 
 void FdoSmPhDependencyWriter::Modify( FdoStringP pkTableName, FdoStringP fkTableName )

Modified: branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Field.cpp
===================================================================
--- branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Field.cpp	2007-02-12 18:26:08 UTC (rev 764)
+++ branches/3.2.x/Utilities/SchemaMgr/Src/Sm/Ph/Field.cpp	2007-02-12 20:30:27 UTC (rev 765)
@@ -130,7 +130,6 @@
             // no default value, just select by qualified name. 
 
             selectSyntax = GetQName();
-
         }
         else { 
             // default value, generate syntax for a function that
@@ -147,8 +146,9 @@
     else {
         // column does not exist.
         // return the default value as a literal plus an alias (the field name).
+
         selectSyntax = FdoStringP(L"(") + 
-            GetManager()->FormatSQLVal(mDefaultValue, pColumn->GetType()) + L") \"" + GetName() + L"\"";
+            GetManager()->FormatSQLVal(mDefaultValue, pColumn->GetType()) + L") as \"" + GetName() + L"\"";
     }
 
     return selectSyntax;
@@ -159,7 +159,7 @@
     FdoStringP colSyntax;
 
     if ( GetColumn() ) {
-        colSyntax = GetName();
+        colSyntax = GetColumn()->GetName();
     }
 
     return colSyntax;



More information about the fdo-commits mailing list