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

170
Views
¿Cómo usar caracteres comodín en ts TypeORM?

Estoy codificando una consulta en mi proyecto de NestT, por lo que me gustaría recuperar información que coincida con los valores de la cláusula LIKE .

El problema con mi consulta es que la tabla tiene tres tipos de registros _INFORMED , _UNINFORMED y WITHOUT . Si uso la oración

 .where("user.firstName like :name", { name:`%_INFORMED%` })

... Coincide con los registros _INFORMED y _UNINFORMED , luego traté de usar el carácter comodín como SQL estándar: '%\\_INFORMED%' pero se ve mal.

¿Tienes alguna idea? ¡Gracias!

Editar:

Consulta TYPEORM completa:

 .createQueryBuilder(Stage, 's') .innerJoin('s.stageType', 'st') .leftJoin('s.reasons', 'r') .select(['s.id', 's.description', 's.name', 'st.id', 'st.name', 'st.displayName', 'r.id', 'r.code', 'r.description']) .where('st.name like :INFORMED', { INFORMED: '%\\INFORMED', }) .orWhere('st.id = :eMeliKeyword', { eMeliKeyword: StageTypesID.DE_MELI_KEYWORD_ID, }) .getMany();
about 4 years ago · Juan Pablo Isaza
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!