Allow update created field if indicated on Cols (#1513)

Allow update created field if indicated on Cols

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1513
This commit is contained in:
Lunny Xiao 2020-01-20 08:23:54 +00:00
parent 6dfe337869
commit 43b364ccfd
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ func (statement *Statement) buildUpdates(bean interface{},
if !includeVersion && col.IsVersion { if !includeVersion && col.IsVersion {
continue continue
} }
if col.IsCreated { if col.IsCreated && !columnMap.contain(col.Name) {
continue continue
} }
if !includeUpdated && col.IsUpdated { if !includeUpdated && col.IsUpdated {