When multiple statement is passed to the transaction and committed, it shall rollback/not make any change if one of the statements causes error.
However, based on the testing, I have chained two statements ( first one being right and last being wrong). Committing results in 200 SC_OK and the first SQL statement is executed.
When multiple statement is passed to the transaction and committed, it shall rollback/not make any change if one of the statements causes error.
However, based on the testing, I have chained two statements ( first one being right and last being wrong). Committing results in 200 SC_OK and the first SQL statement is executed.
{ "Transaction": {{transaction1}}, "Book": 50, "Action": "loan" }
{ "Transaction": {{transaction1}}, "Book": 999999, "Action": "return" }
Transaction in the db: (Obviously one with id=999999 is wrong)
Commit success (somehow)
Database does make valid book (id=50) being loaned
Collection Link: https://www.getpostman.com/collections/60fd4e59edd2e444ed04