diff --git a/orm/orm.go b/orm/orm.go index e59589aa..b00c974e 100644 --- a/orm/orm.go +++ b/orm/orm.go @@ -548,6 +548,9 @@ func NewOrmWithDB(driverName, aliasName string, db *sql.DB) (Ormer, error) { al.Name = aliasName al.DriverName = driverName + al.DB = db + + detectTZ(al) o := new(orm) o.alias = al