mirror of
https://gitee.com/johng/gf
synced 2026-07-05 13:22:16 +08:00
improve package gdb for structire retrieving in transaction operations
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user