Fixed inverted onBegin Transaction logic

Use Case: When running against MariaDB the existing case fails because the
onBegin logic is inverted and tries to get a transaction when no
transaction is in progress.
Merge pull request #560 from makearl/RDBMS-Transaction-Fix

Fixed inverted onBegin Transaction logic