MAI CALL - step 7
This commit is contained in:
@@ -58,11 +58,10 @@ import type { PrismaClient } from '@prisma/client';
|
||||
* The extension does not re-wrap the inner transactional client. Either:
|
||||
* - issue all operations through the outer scoped client and use the
|
||||
* sequential array form: `await db.$transaction([op1, op2])`, OR
|
||||
* - if you need the interactive form, scope explicitly:
|
||||
* await prisma.$transaction(async (tx) => {
|
||||
* const scopedTx = tenantScoped(tx as PrismaClient, tenantId);
|
||||
* ...
|
||||
* });
|
||||
* - if you need the interactive form, inject tenantId manually into
|
||||
* every where/data clause inside the callback. The transaction
|
||||
* client does NOT support $extends (it is in ITXClientDenyList),
|
||||
* so tenantScoped(tx, tenantId) throws at runtime.
|
||||
*
|
||||
* 3. Models without tenantId (currently only `Tenant`). These are passed
|
||||
* through unchanged. Code touching Tenant must take care not to leak
|
||||
|
||||
Reference in New Issue
Block a user