Another question when using the `.update` function...
# orm-help
o
Another question when using the
.update
function of the client API I am trying to update a record with provided id:
Copy code
const updateStatement = await this.prisma.statement.update({
      where: { id },
      data: {
        content: statementData.content,
      },
    });
Prisma client in such a case sends three sql queries to databse
Copy code
prisma:query SELECT "public"."Statement"."id" FROM "public"."Statement" WHERE "public"."Statement"."id" = $1
prisma:query UPDATE "public"."Statement" SET "content" = $1 WHERE "public"."Statement"."id" IN ($2)
prisma:query SELECT "public"."Statement"."id", "public"."Statement"."content", "public"."Statement"."contextId", "public"."Statement"."createdAt" FROM "public"."Statement" WHERE "public"."Statement"."id" = $1 LIMIT $2 OFFSET $3
I see it correctly, the first query does not make sense. Could you confirm that this is the case?