Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
Prisma bulk update items with different data

I need to update some fields, but each item should be updated with different value:

await prisma.tokens.updateMany({
    where: {
        product_id: "123",
      },
      data: {
        contract_address: '0x123456',
        mint_edition: i, // <- `i` should be taken from a loop
      },
})

Is there a way to update many items each with different data?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As far as I know there is no such functionality, what I would do is splitting it up into 2 separate steps. First, I would get all tokens with getAll({ where: {} }) and then loop over each token and update one at a time with the index from the loop. If you want to make sure that either all tokens update or none, you can wrap everything within a transaction

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!