From a5bfe2f39dab84fb3a51b3e6893469f4867c235d Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 7 Jan 2021 11:45:40 +0800 Subject: [PATCH] Keep Error for new Session --- gorm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gorm.go b/gorm.go index ae94daf4..488e74e7 100644 --- a/gorm.go +++ b/gorm.go @@ -163,6 +163,7 @@ func (db *DB) Session(config *Session) *DB { tx = &DB{ Config: &txConfig, Statement: db.Statement, + Error: db.Error, clone: 1, } )