diff --git a/db/db.go b/db/db.go index dcc257c..2226a32 100644 --- a/db/db.go +++ b/db/db.go @@ -42,7 +42,7 @@ func (that *HoTimeDB) GetType() string { // Action 事务,如果action返回true则执行成功;false则回滚 func (that *HoTimeDB) Action(action func(db HoTimeDB) bool) bool { - db := HoTimeDB{DB: that.DB, HoTimeCache: that.HoTimeCache} + db := HoTimeDB{DB: that.DB, HoTimeCache: that.HoTimeCache, Prefix: that.Prefix} tx, err := db.Begin() if err != nil { that.LastErr.SetError(err)