The previous iommi middleware implementation would raise an error if any database connection had ATOMIC_REQUESTS enabled.
This commit changes the middleware to use transaction savepoints instead, so atomicity is retained while still allowing iommi to intercept and render responses.
Changes:
Updated middleware logic to preserve atomicity if enabled in database settings
Ensured proper rollback in the event of exceptions
I added tests to ensure that the transactions are working as expected.
The previous iommi middleware implementation would raise an error if any database connection had ATOMIC_REQUESTS enabled.
This commit changes the middleware to use transaction savepoints instead, so atomicity is retained while still allowing iommi to intercept and render responses.
Changes:
I added tests to ensure that the transactions are working as expected.