Closed jack-guy closed 8 years ago
This adapter uses the mongoose .lean() functionality when fetching multiple results, that makes using .toObject() not necessary in this case. However, you could configure it to not use lean.
Please take a look at this discussion: https://github.com/feathersjs/feathers-mongoose/issues/51
@jamesjnadeau It defaults to false, and I'd rather not have it apply service-wide. Either way I think the hook should be fixed. Unless you just want to remove the hook entirely @daffl?
My mistake then, in my head(and my projects), lean is true by default....
@harangue yup this is totally valid. Thanks for bringing it up and tackling it Jack!
The hook only works for mongoose resources on
result
, notresult.data
. I'll probably submit a PR shortly.