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

340
Views
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
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!