Skip to content

PostgreSQL: transaction() doesn't guarantee use of a database transaction #7068

Open
balderdashy/sails-hook-orm
#22
@alxndrsn

Description

@alxndrsn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions