You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am using feathers-mongoose version 8.5.1 , mongoose 6.0.13, I am installing 'mongoose-lean-virtuals' and the lean attribute that we should pass in order to support that is lean: {virtuals: true}, which does not align with the code in this repo - which demands lean to be boolean.
The thing is that this actually make it work - my question is: how come ? I presume feathers just pass that to mongoose which support that ( with the plugin of course ).
is it true? if so - the documentation and code and options types should support that.
The text was updated successfully, but these errors were encountered:
that feathers-mongoose does pass whatever value you provide to lean. So the types could be updated, but I believe that will be difficult to nail down all of the potential options and will likely just be an any.
Furthermore, the lean option should be used per service call in params. I believe this is how some other database adapters work, such as sequelize raw. So the service should default to whatever lean option the service is created with, but you can also override it with params
// This would work, but we would have to pluck `lean` off// the mongoose param before passing to the underlying methodapp.service('posts').find({mongoose: {lean: false}});// Don't put in mongoose param, make it a vanilla param.// This would also work and us not have to pluck it off// of params.mongoose, but its just kinda lonelyapp.service('posts').find({lean: false});
Hi, I am using feathers-mongoose version 8.5.1 , mongoose 6.0.13, I am installing 'mongoose-lean-virtuals' and the lean attribute that we should pass in order to support that is
lean: {virtuals: true}
, which does not align with the code in this repo - which demandslean
to beboolean
.The thing is that this actually make it work - my question is: how come ? I presume feathers just pass that to mongoose which support that ( with the plugin of course ).
is it true? if so - the documentation and code and options types should support that.
The text was updated successfully, but these errors were encountered: