TinyORM icon indicating copy to clipboard operation
TinyORM copied to clipboard

DB::beginTransaction assert()-ing

Open SchaichAlonso opened this issue 2 years ago • 1 comments

Currently, TinyORM is asserting no other transaction on the same connection is in partially commited state when beginTransaction is invoked.

However, the Q_ASSERT statements are disabled when QT_NO_DEBUG is defined during compilation, i.e. when compiling in release mode. If TinyORM needs it's consumers to explicit distinction between top level transactions and truely nested transactions / savepoints, exceptions provide a more reliable error handling mechanism then assertions do

SchaichAlonso avatar Oct 22 '23 22:10 SchaichAlonso

This is true, this is one of the first code I wrote and it should be completely refactored to exceptions, i know about this here .

silverqx avatar Oct 23 '23 08:10 silverqx