diff --git a/VERSION b/VERSION index bccc7262..2107ad3c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -xorm v0.5.2.0303 +xorm v0.5.2.0304 diff --git a/session.go b/session.go index 05c59569..10a8f81f 100644 --- a/session.go +++ b/session.go @@ -2204,12 +2204,12 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error continue } if session.Statement.ColumnStr != "" { - if _, ok := session.Statement.columnMap[col.Name]; !ok { + if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; !ok { continue } } if session.Statement.OmitStr != "" { - if _, ok := session.Statement.columnMap[col.Name]; ok { + if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; ok { continue } } @@ -2252,12 +2252,12 @@ func (session *Session) innerInsertMulti(rowsSlicePtr interface{}) (int64, error continue } if session.Statement.ColumnStr != "" { - if _, ok := session.Statement.columnMap[col.Name]; !ok { + if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; !ok { continue } } if session.Statement.OmitStr != "" { - if _, ok := session.Statement.columnMap[col.Name]; ok { + if _, ok := session.Statement.columnMap[strings.ToLower(col.Name)]; ok { continue } } diff --git a/statement.go b/statement.go index 982542d5..06b72739 100644 --- a/statement.go +++ b/statement.go @@ -867,7 +867,8 @@ func (statement *Statement) Cols(columns ...string) *Statement { } statement.ColumnStr = statement.Engine.Quote(strings.Join(newColumns, statement.Engine.Quote(", "))) if strings.Contains(statement.ColumnStr, ".") { - statement.ColumnStr = strings.Replace(statement.ColumnStr, ".", statement.Engine.Quote("."), -1) + statement.ColumnStr = strings.Replace(statement.ColumnStr, ".", + statement.Engine.dialect.QuoteStr()+"."+statement.Engine.dialect.QuoteStr(), -1) } statement.ColumnStr = strings.Replace(statement.ColumnStr, statement.Engine.Quote("*"), "*", -1) return statement diff --git a/xorm.go b/xorm.go index 1c543f07..d0a88ab2 100644 --- a/xorm.go +++ b/xorm.go @@ -17,7 +17,7 @@ import ( ) const ( - Version string = "0.5.2.0303" + Version string = "0.5.2.0304" ) func regDrvsNDialects() bool {