Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

343
Vistas
How can I select entire document in mongoose after using select: false?

I have a small problem with my mongoose schema, I'm using select: false in some fields of my Schemas to prevent some fields to be shown in the response, this is obviously common.

Now, the problem is, I need to select the entire document again, but if I try to do .select("+field_a +field_b +field_c +field_d [...] +field_n" it will eventually be problematic, I will need to add a +field_xyz in every single place I need the entire document.

Is there any way to select the entire document ignoring the select: false?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda