MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
160 stars 47 forks source link

Close connection on rollback [MySQL] #870

Closed felipehertzer closed 4 months ago

felipehertzer commented 4 months ago

Hey @josephmancuso,

I found out that the rollback command has an issue of keeping the MySql connection open. Similar than #857

DB.begin_transaction()
QueryBuilder().table('user').update('status', 1)
DB.rollback()

I added a check to close the connection similar with the commit function.

Thank you.