Open arimgibson opened 1 month ago
The error appears on sequential (array) style calls to $transaction([ ... ])
, but not on interactive style calls to $transaction(async (prisma) => { ... })
So as a workaround it's easy to convert from "sequential" to "interactive" style
Actually looking at the code I think "interactive" style transactions don't throw this error, but the queries are not actually run inside the transaction, which is even worse!
I just found the same problem @rpaterson described in my project. After installing this extension, previously working code is now unable to read data written within the same transaction, which violates the isolation properties of SQL transactions.
I ran into this issue today as well. Although in my case, this appears to also happen if I configure additional extensions. If prisma-extension-soft-delete
is the only extension configured, transactions work just fine 🤷🏼♂️.
In my case, both removing prisma-extension-soft-delete
, or making it the only extension resolves the issue.
I ran into this issue today as well. Although in my case, this appears to also happen if I configure additional extensions. If
prisma-extension-soft-delete
is the only extension configured, transactions work just fine 🤷🏼♂️.In my case, both removing
prisma-extension-soft-delete
, or making it the only extension resolves the issue.
Interesting observation; haven't seen the same here! This is the only one we're using and still having issues. Will try to get around to that reproducible example this weekend; keeps slipping my mind
For others with the same, please +1 (thumbs up) this comment instead of starting a long chain of just "same" -- keeps things cleaner. Thank you :pray:
When using the soft delete client to try and perform a transaction, the following error is thrown:
error: All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.
The same transaction will run successfully when not utilizing the extension. Workaround: utilize a normal Prisma client for transactions
Can come back later this week to provide a reproduction; don't have time right this second and thought I'd throw this out there in case this is something we're already aware of. Couldn't find in other bug reports