Skip to content

Conversation

vkarpov15
Copy link
Collaborator

Fix #14818

Summary

Logic largely copied from https://github.com/mongoosejs/mongoose-lean-virtuals/blob/master/index.js to apply a Model's virtuals to a POJO.

Examples

@hasezoey hasezoey added this to the 8.7 milestone Sep 23, 2024
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly looks good to me, some minor style suggestions, aside from that:

  • typescript types for the new applyVirtuals are not added yet
  • there is a distinct lack of documentation in the applyVirtuals file

@vkarpov15 vkarpov15 requested a review from hasezoey September 25, 2024 14:29
@vkarpov15
Copy link
Collaborator Author

@hasezoey thanks for the feedback. I added docs and addressed issues 👍

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, typescript types for the new applyVirtuals on Model are still missing though

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@vkarpov15 vkarpov15 merged commit a4e3308 into 8.7 Sep 26, 2024
29 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14818-2 branch September 26, 2024 16:20
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.

2 participants