From d011ebe7afbce397db6bf50a7aa12855cb74877f Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Mon, 26 Oct 2020 10:17:25 +0800 Subject: [PATCH] Fix clone statement for Unscoped, UpdatingColumn, close #3681 --- statement.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/statement.go b/statement.go index 38d35926..567df869 100644 --- a/statement.go +++ b/statement.go @@ -408,6 +408,7 @@ func (stmt *Statement) clone() *Statement { TableExpr: stmt.TableExpr, Table: stmt.Table, Model: stmt.Model, + Unscoped: stmt.Unscoped, Dest: stmt.Dest, ReflectValue: stmt.ReflectValue, Clauses: map[string]clause.Clause{}, @@ -419,6 +420,7 @@ func (stmt *Statement) clone() *Statement { Schema: stmt.Schema, Context: stmt.Context, RaiseErrorOnNotFound: stmt.RaiseErrorOnNotFound, + UpdatingColumn: stmt.UpdatingColumn, } for k, c := range stmt.Clauses {