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

213
Views
findFirst no funciona con 3 filtros en Prisma

Tengo este problema cuando quiero verificar si tengo al menos un registro con los parámetros. Con 2 filtros funciona bien, pero con 3 no funciona.

 await prismaClient.t_endereco .findFirst({ where: { logradouro, (string) bairro, (string) numero, (number) }, })

la condición para actualizar el registro es no tener otro idéntico.

Traté de usar AND también:

 await prismaClient.t_endereco .findFirst({ where: { AND:[ {logradouro}, {bairro}, {numero}, ] }, })

mismo problema

alguien que me ayude con esto?

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

0

Puedes intentar lo siguiente:

 const { PrismaClient } = require('@prisma/client') const prisma = new PrismaClient() prisma.category.findFirst({ where: { OR: [ { id: 2 }, { name: 'new' }, { description: 'd1' }, ], }, }) .then(data => { console.log(data) }) .catch(error => { console.error(error) })

Puedes consultar la documentación para más información

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!