From c2f2b6cc52564965a1d384259b3696c647c32d1d Mon Sep 17 00:00:00 2001 From: Arniu Date: Fri, 1 Feb 2019 09:42:05 +0800 Subject: [PATCH 1/2] Fix doc. doc --- lib/document.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/document.js b/lib/document.js index 39d357e5be1..34c4aabf32f 100644 --- a/lib/document.js +++ b/lib/document.js @@ -1502,11 +1502,11 @@ Document.prototype.$isDefault = function(path) { * * ####Example: * product.remove(function (err, product) { - * product.isDeleted(); // true + * product.$isDeleted(); // true * product.remove(); // no-op, doesn't send anything to the db * - * product.isDeleted(false); - * product.isDeleted(); // false + * product.$isDeleted(false); + * product.$isDeleted(); // false * product.remove(); // will execute a remove against the db * }) * From e91dbfe4207bc33c5776aefbe2e46b81d271e7e3 Mon Sep 17 00:00:00 2001 From: Arniu Date: Fri, 1 Feb 2019 09:42:53 +0800 Subject: [PATCH 2/2] Fix plugin doc --- docs/middleware.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/middleware.jade b/docs/middleware.jade index c4f08eae66b..813c2d01f5e 100644 --- a/docs/middleware.jade +++ b/docs/middleware.jade @@ -271,13 +271,13 @@ block content ```javascript // Only document middleware - schema.pre('remove', { document: true } function() { + schema.pre('remove', { document: true }, function() { console.log('Removing doc!'); }); // Only query middleware. This will get called when you do `Model.remove()` // but not `doc.remove()`. - schema.pre('remove', { query: true } function() { + schema.pre('remove', { query: true }, function() { console.log('Removing!'); }); ```