forked from mirror/gorm
Fix clone statement for Unscoped, UpdatingColumn, close #3681
This commit is contained in:
parent
cb591a7129
commit
d011ebe7af
|
@ -408,6 +408,7 @@ func (stmt *Statement) clone() *Statement {
|
||||||
TableExpr: stmt.TableExpr,
|
TableExpr: stmt.TableExpr,
|
||||||
Table: stmt.Table,
|
Table: stmt.Table,
|
||||||
Model: stmt.Model,
|
Model: stmt.Model,
|
||||||
|
Unscoped: stmt.Unscoped,
|
||||||
Dest: stmt.Dest,
|
Dest: stmt.Dest,
|
||||||
ReflectValue: stmt.ReflectValue,
|
ReflectValue: stmt.ReflectValue,
|
||||||
Clauses: map[string]clause.Clause{},
|
Clauses: map[string]clause.Clause{},
|
||||||
|
@ -419,6 +420,7 @@ func (stmt *Statement) clone() *Statement {
|
||||||
Schema: stmt.Schema,
|
Schema: stmt.Schema,
|
||||||
Context: stmt.Context,
|
Context: stmt.Context,
|
||||||
RaiseErrorOnNotFound: stmt.RaiseErrorOnNotFound,
|
RaiseErrorOnNotFound: stmt.RaiseErrorOnNotFound,
|
||||||
|
UpdatingColumn: stmt.UpdatingColumn,
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, c := range stmt.Clauses {
|
for k, c := range stmt.Clauses {
|
||||||
|
|
Loading…
Reference in New Issue