Wrap SQL queries into transactions
Mainly to check that some entities are not already present when inserted (they can be inserted in between the application check and the SQL insertion).
Mainly to check that some entities are not already present when inserted (they can be inserted in between the application check and the SQL insertion).