Bulk Write Support #325
Answered
by
ilovepixelart
rodrigoramos
asked this question in
Q&A
-
|
Hi there! I'd like to know: does this lib supports Bulk Write? I mean, if I use bulkWrite it will track those changes? |
Beta Was this translation helpful? Give feedback.
Answered by
ilovepixelart
Oct 2, 2025
Replies: 1 comment 2 replies
-
|
Hello @rodrigoramos, no, this library does not track changes made via bulkWrite. The plugin works by hooking into Mongoose middleware (pre/post hooks), and bulkWrite is a direct MongoDB operation that bypasses Mongoose document middleware. The library only tracks changes through standard Mongoose operations like save(), create(), findOneAndUpdate(), deleteOne(), etc. Probably need to add this to the docs. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you need to track bulk changes, consider using individual Mongoose operations or using insertMany, updateMany, etc., which can be hooked into with middleware. But you trade performance for audit and events in such case.