From 43b364ccfd3ec5cd6935a69db9fcb23b2a27e7c6 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 20 Jan 2020 08:23:54 +0000 Subject: [PATCH] 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 --- statement.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/statement.go b/statement.go index dc251d30..ea3ecabe 100644 --- a/statement.go +++ b/statement.go @@ -247,7 +247,7 @@ func (statement *Statement) buildUpdates(bean interface{}, if !includeVersion && col.IsVersion { continue } - if col.IsCreated { + if col.IsCreated && !columnMap.contain(col.Name) { continue } if !includeUpdated && col.IsUpdated {