P
Prisma3mo ago
Pong

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?
1 Reply
jonfanz
jonfanz3mo ago
Are you setting multiple products to have the same “order” or will each product have a different “order”?