Disabling a plugin in Mongoose schema
up vote
0
down vote
favorite
I'm using a Mongoose plugin (mongoose-patch-history) which automatically tracks changes to a model to a MongoDB collection. I need to selectively disable the plugin (i.e. I only want to track changes on certain models, and not others, based on a flag/critera).
I believe that I need some kind of filtering capability within the plugin, but it doesn't provide a mechanism for this.
Is there any other way I can achieve this?
node.js mongoose plugins
add a comment |
up vote
0
down vote
favorite
I'm using a Mongoose plugin (mongoose-patch-history) which automatically tracks changes to a model to a MongoDB collection. I need to selectively disable the plugin (i.e. I only want to track changes on certain models, and not others, based on a flag/critera).
I believe that I need some kind of filtering capability within the plugin, but it doesn't provide a mechanism for this.
Is there any other way I can achieve this?
node.js mongoose plugins
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using a Mongoose plugin (mongoose-patch-history) which automatically tracks changes to a model to a MongoDB collection. I need to selectively disable the plugin (i.e. I only want to track changes on certain models, and not others, based on a flag/critera).
I believe that I need some kind of filtering capability within the plugin, but it doesn't provide a mechanism for this.
Is there any other way I can achieve this?
node.js mongoose plugins
I'm using a Mongoose plugin (mongoose-patch-history) which automatically tracks changes to a model to a MongoDB collection. I need to selectively disable the plugin (i.e. I only want to track changes on certain models, and not others, based on a flag/critera).
I believe that I need some kind of filtering capability within the plugin, but it doesn't provide a mechanism for this.
Is there any other way I can achieve this?
node.js mongoose plugins
node.js mongoose plugins
edited Nov 13 at 1:18
Neil Lunn
95.7k21168178
95.7k21168178
asked Nov 12 at 14:43
Brent
12
12
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264539%2fdisabling-a-plugin-in-mongoose-schema%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown