From 373bb6fe40cdd7d64ea58ffaa009aeb1efab1ac3 Mon Sep 17 00:00:00 2001 From: clozanosanchez Date: Thu, 18 May 2017 16:24:45 +0200 Subject: [PATCH] Update clone method to include indexes --- lib/schema.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/schema.js b/lib/schema.js index 22ff54efb2c..8dce1252591 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -274,6 +274,7 @@ Schema.prototype.clone = function() { s.methods = utils.clone(this.methods); s.statics = utils.clone(this.statics); s._plugins = utils.clone(this._plugins); + s._indexes = utils.clone(this._indexes); s.s.hooks = this.s.hooks.clone(); return s; };