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

feat: add middleware for bulkWrite() and createCollection() #14358

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #7893
Fix #14263

Summary

Add support for schema.pre('bulkWrite', function(next, ops) { ... }) and schema.pre('createCollection', function() { ... }). Support for 2 new model middleware functions 👍

Examples

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

though maybe consider doing this for a minor version instead of patch

@vkarpov15 vkarpov15 added this to the 8.2 milestone Feb 20, 2024
@vkarpov15
Copy link
Collaborator Author

Yeah this is going into 8.2.

@vkarpov15 vkarpov15 changed the base branch from master to 8.2 February 20, 2024 15:43
@vkarpov15 vkarpov15 merged commit 2277ad4 into 8.2 Feb 20, 2024
41 checks passed
@hasezoey hasezoey deleted the vkarpov15/bulkwrite-middleware branch February 20, 2024 19:21
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.

Hook into bulkWrite Hook to collection creation
2 participants