This repository was archived by the owner on Mar 21, 2025. It is now read-only.
How to unlink with all linked models in update
?
#110
-
For example, I have an user that can be linked with many posts. In the update parameters, I can unlink it from posts by providing the ids of linked posts. In order for that to happen, I need to fetch linked posts beforehand. Is there an easier solution that doesn't involve calling the database two times? |
Beta Was this translation helpful? Give feedback.
Answered by
Brendonovich
Jul 20, 2022
Replies: 1 comment 14 replies
-
Oh, I think this is actually a problem with PCR. The Prisma docs say that updateMany takes a WhereInput, but I have taking UniqueWhereInputs. Will get that fixed. |
Beta Was this translation helpful? Give feedback.
14 replies
Answer selected by
teenjuna
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, I think this is actually a problem with PCR. The Prisma docs say that updateMany takes a WhereInput, but I have taking UniqueWhereInputs. Will get that fixed.