Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Prisma mutations to use updateMany and deleteMany #203

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gfargo
Copy link

@gfargo gfargo commented Jul 3, 2024

Updates generatePrismaDeleteMutation & generatePrismaUpdateMutation to conditionally use updateMany and deleteMany in generated Prisma mutations for handling multiple where entries when belongsToUser is true

This should resolve #202 an issue related to multiple 'where' conditions currently not being supported by Prisma.

Switch from `update` to `updateMany` and `delete` to `deleteMany` in mutation functions for handling multiple entries. Resolves issue related to multiple 'where' conditions not being supporting by Prisma
Switch from `updateMany`/`deleteMany` to conditional `update`/`delete` queries based on user ownership. Enhances efficiency and clarity of database operations by using the most appropriate query method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Prisma mutations broken when generating tables owned by the user
1 participant