Skip to content
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

Use .lean() for Mongoose documents #100

Closed
wants to merge 10 commits into from

Conversation

jonasmeier1212
Copy link

See #74 for why this is needed for Mongoose documents.

It also contains some typing improvements, that aren't part of the issue, but I don't have time now to filter out the relevant commits and they are useful anyway.

Jonas Meier and others added 10 commits April 5, 2022 15:50
With hydrated Mongoose documents they aren't serializable.
Therefore caching can't be used, as it serializes the documents.
Without this someone can use those methods outside of the class.
This could lead to inconstistent options and is against the intented abstraction
@jonasmeier1212
Copy link
Author

I created a new PR without all the unrelated commits, therefore I will close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant