Closed tiesch closed 2 years ago
let's take this document as an example
{ fisrtname: 'jhon', lastname: 'doe', email: 'jhondoe@email.com', phonenumber: '123', password: 'secret', }
so the idea is to find the document but selecting specific fields (obviously using mongoose-lean-getters)
userCollection.find().select(['fisrtname']).lean({ getters: true });
expected output
{ fisrtname: 'jhon', }
received output
{ fisrtname: 'jhon', lastname: undefined, email: undefined, phonenumber: undefined, password: undefined, }
this behavior is caused by this plugin I tested it with version 0.3.0
0.3.0
query projection reference -> link
let's take this document as an example
so the idea is to find the document but selecting specific fields (obviously using mongoose-lean-getters)
expected output
received output
this behavior is caused by this plugin I tested it with version
0.3.0
query projection reference -> link