From cf31727ab5ba97e20879dbb53ce6ffb08dc0b9c7 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 20 Jan 2020 14:33:49 +0800 Subject: [PATCH] Allow update created field if indicated on Cols --- statement.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/statement.go b/statement.go index 67e35213..14e99874 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 {