Hi everyone! I have one question. Is there any way...
# orm-help
h
Hi everyone! I have one question. Is there any ways to implement Declarative Transaction Management (like
@transactional
in spring)? I’m using Interactive Transaction feature from prisma but it is quit bothersome when especially repository layer is separated
Copy code
await prisma.$transaction(async (prisma) => {
    // ...
    await createUser(prisma, ...)
    await createReservation(prisma, ...)
    await updateLocation(prisma, ...) 
})
1
n
Hi @Harry Lee 👋 We do have a feature request to add a
@transactions
decorator as mentioned here: #13004 Is this similar to what you need?
h
yes, thanks! the reply on #13004 is similar to what i’ve been looking for! I don’t want pass transactionClient to repository layer every time when transaction is required..