This commit is contained in:
Lunny Xiao 2015-10-06 22:56:28 +08:00
parent 803f6db50c
commit 300379e016
4 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
xorm v0.4.4.0924
xorm v0.4.4.1006

View File

@ -3565,7 +3565,7 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6
colNames, args = buildUpdates(session.Engine, table, bean, false, false,
false, false, session.Statement.allUseBool, session.Statement.useAllCols,
session.Statement.mustColumnMap, session.Statement.nullableMap,
session.Statement.columnMap, true)
session.Statement.columnMap, true, session.Statement.unscoped)
} else {
colNames, args, err = genCols(table, session, bean, true, true)
if err != nil {

View File

@ -182,7 +182,7 @@ func buildUpdates(engine *Engine, table *core.Table, bean interface{},
includeVersion bool, includeUpdated bool, includeNil bool,
includeAutoIncr bool, allUseBool bool, useAllCols bool,
mustColumnMap map[string]bool, nullableMap map[string]bool,
columnMap map[string]bool, update bool) ([]string, []interface{}) {
columnMap map[string]bool, update, unscoped bool) ([]string, []interface{}) {
colNames := make([]string, 0)
var args = make([]interface{}, 0)
@ -199,7 +199,7 @@ func buildUpdates(engine *Engine, table *core.Table, bean interface{},
if !includeAutoIncr && col.IsAutoIncrement {
continue
}
if col.IsDeleted {
if col.IsDeleted && !unscoped {
continue
}
if use, ok := columnMap[col.Name]; ok && !use {

View File

@ -17,7 +17,7 @@ import (
)
const (
Version string = "0.4.4.0824"
Version string = "0.4.4.1006"
)
func regDrvsNDialects() bool {