#Transaction operations are not executing sequentially when using PrismaPlanetScale adapter

2 messages · Page 1 of 1 (latest)

short sequoia
#

I've been working on upgrading our Prisma to v6 and leveraging some of the new features like driver adapters, specifically the PrismaPlanetScale adapter. After starting to use the PrismaPlanetScale adapter, I am getting an error when trying to execute multiple related operations in a transaction. For example, the following transaction errors:

await prisma.$transaction([
  prisma.user.create({ data: { id, ... } }),
  prisma.user.update({ where: { id }, data: { ... } })
])

The error is An operation failed because it depends on one or more records that were required but not found. No record was found for an update.

civic veldtBOT
#

You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!