mongoosejs / mongoose-lean-virtuals

Attach virtuals to the results of mongoose lean() queries
Apache License 2.0
45 stars 24 forks source link

mongoose lean not overwrite #5

Closed mxyue closed 6 years ago

mxyue commented 6 years ago

mongoose(4.9.5) lean method is this ` Query.prototype.lean = function(v) {

this._mongooseOptions.lean = arguments.length ? !!v : true;

return this;

}; ` lean function just get true or false, can't pass other params. It's not work for me

vkarpov15 commented 6 years ago

Upgrade to mongoose >= 4.11.0

vkarpov15 commented 6 years ago

@mxyue can you provide a repro script?