improve package gdb for structire retrieving in transaction operations

This commit is contained in:
John
2020-11-21 11:42:50 +08:00
parent 8ca535dbf0
commit 042dc0b33f

View File

@ -141,6 +141,7 @@ func (m *Model) DB(db DB) *Model {
// TX sets/changes the transaction for current operation.
func (m *Model) TX(tx *TX) *Model {
model := m.getModel()
model.db = tx.db
model.tx = tx
return model
}