Feature Request: Schema-level pre middleware for bulkWrite and createCollection
Feature Request: Schema-level pre middleware for bulkWrite and createCollection: a task in LegoFlow-SWE (Harbor dataset). Currently, Mongoose supports schema-level pre() middleware for many operations (e.g., find , updateOne , save , insertMany , aggregate ), but bulkWrite and createCollection are…
The task
Currently, Mongoose supports schema-level `pre()` middleware for many operations (e.g., `find`, `updateOne`, `save`, `insertMany`, `aggregate`), but `bulkWrite` and `createCollection` are **not** supported. This means any cross-cutting logic implemented via schema hooks—such as automatic tenant isolation, soft-delete…
Part of Lego-X/LegoFlow-SWE.