bug fixed for unscoped
This commit is contained in:
parent
f087929082
commit
7db23ba469
|
@ -1420,6 +1420,6 @@ func (engine *Engine) FormatTime(sqlTypeName string, t time.Time) (v interface{}
|
||||||
// Always disable struct tag "deleted"
|
// Always disable struct tag "deleted"
|
||||||
func (engine *Engine) Unscoped() *Session {
|
func (engine *Engine) Unscoped() *Session {
|
||||||
session := engine.NewSession()
|
session := engine.NewSession()
|
||||||
defer session.Close()
|
session.IsAutoClose = true
|
||||||
return session.Unscoped()
|
return session.Unscoped()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue