how do I do this upsert query in prisma?
basically I'm increasing the quantity by 1
5 Replies
Hi @Snarkatude 👋
Can you please the schema file for this?
this is the cart item model
Can you please try this query?
item.id
and user.id
are just placeholders
didn't know you could merge where clauses like that
This part of the docs shows how it works
https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types/working-with-composite-ids-and-constraints#where-you-can-use-compound-ids-and-unique-constraints
Working with compound IDs and unique constraints (Concepts) | Prism...
How to read, write, and filter by compound IDs and unique constraints.