Option to disable applyPlugins
for discriminator
function
#12604
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Milestone
Prerequisites
Issue
(Continuation of #12472)
I had now tried #12542 in the project (typegoose) where i had first noticed the problem of hooks being duplicated (from plugins) which got resolved, but now i had noticed that the plugins are still force-fully copied over from the base schema instead of merging or being able to use the plugins applied to the discriminator model.
This is a proposal to add a option similar to
mergeHooks
to disable applying plugins from the base model (ie disabling the alwaystrue
ofapplyPlugins
), for example this new options could be namedmergePlugins
orapplyPlugins
(like the parameter name) and default totrue
mongoose/lib/model.js
Line 1245 in bd034fa
Example
Current Behavior:
Example new Behavior:
re #12473
The text was updated successfully, but these errors were encountered: