go-gorm / playground

GORM Playground (Please Create PR for this project to report issues)
MIT License
89 stars 678 forks source link

Nested transaction bug using a wrapper function #757

Open phroggyy opened 2 weeks ago

phroggyy commented 2 weeks ago

Explain your user case and expected results

When wrapping db.Transaction in your own function, savepoints are given the same name, due to the logic here. This results in rollbacks not being applied as expected.

I expect to be able to use nested transactions using my own wrapper.