Parcourir la source

fixed bug when using uuid with mssql

xormplus il y a 9 ans
Parent
commit
12941317ee
2 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 3 0
      mssql_dialect.go
  2. 1 1
      xorm.go

+ 3 - 0
mssql_dialect.go

@@ -247,6 +247,9 @@ func (db *mssql) SqlType(c *core.Column) string {
 		res = core.Text
 		res = core.Text
 	case core.Double:
 	case core.Double:
 		res = core.Real
 		res = core.Real
+	case core.Uuid:
+		res = core.Varchar
+		c.Length = 40
 	default:
 	default:
 		res = t
 		res = t
 	}
 	}

+ 1 - 1
xorm.go

@@ -17,7 +17,7 @@ import (
 
 
 const (
 const (
 	// Version show the xorm's version
 	// Version show the xorm's version
-	Version string = "0.6.0.1010"
+	Version string = "0.6.0.1016"
 )
 )
 
 
 func regDrvsNDialects() bool {
 func regDrvsNDialects() bool {