Pong
Pong
Explore posts from servers
PPrisma
Created by Pong on 5/10/2024 in #help-and-questions
Updating several different data
I'm having a doubt. I have a products table, it has a field called order, which is the order in which the products are displayed. This order field, the user can change, but the problem here is, how do I create a Prisma function that updates, for example, the order field of 5 different products? The only solution that pleases me is to use update with a loop, but I'm not very pleased with it, because the list of products can be large... What's the best way to do this?
3 replies