Node version: 14.15.0
Sails version (sails): 1.4.0
ORM hook version (sails-hook-orm): 2.1.1
DB adapter & version (e.g. [email protected]): [email protected]
Observed
Calling datastore.transaction(during) when using the sails-postgresql adapter for Waterline doesn't guarantee that during will be run inside a database transaction.
If there is no transaction-specific code in the executed SQL, the during code will complete without error, so the user may not be aware that their query or queries were not transactional.
Steps to recreate
Example project: https://github.com/alxndrsn/sailsjs-postgres-transactions-maybe
Maybe related to #7017.
Node version:
14.15.0Sails version (sails):
1.4.0ORM hook version (sails-hook-orm):
2.1.1DB adapter & version (e.g. [email protected]):
[email protected]Observed
Calling
datastore.transaction(during)when using thesails-postgresqladapter for Waterline doesn't guarantee thatduringwill be run inside a database transaction.If there is no transaction-specific code in the executed SQL, the
duringcode will complete without error, so the user may not be aware that their query or queries were not transactional.Steps to recreate
Example project: https://github.com/alxndrsn/sailsjs-postgres-transactions-maybe
Maybe related to #7017.