-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hooks.toObject() fails if data is paginated #77
Comments
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: #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.The text was updated successfully, but these errors were encountered: