Fix: Transaction commits/rollback

Only commit if there are as many commits as beginTransaction
but immediatly rollback.
Revert "Fix: Transaction commits/rollback"

This reverts commit 93fa52c83e2b1b583c1f19cd197212e9592a9a7e.
Fix: commit/rollback transaction

Only commit if there are as many commits as beginTransaction
but immediatly rollback.
Some cleaning
Initial tests units file creation
Fix: setForeignKey with many relation and fix setOneRelation exception message,