Skip to content

Update Prisma mutations to use updateMany and deleteMany#203

Open
gfargo wants to merge 2 commits intovercel:masterfrom
gfargo:master
Open

Update Prisma mutations to use updateMany and deleteMany#203
gfargo wants to merge 2 commits intovercel:masterfrom
gfargo:master

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.

gfargo added 2 commits July 3, 2024 18:57
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