From d0cdbd84ea0eea222aed675de8e1f53b140e6039 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 3 Oct 2013 09:14:24 -0700 Subject: [PATCH] Use super_ to call the base class --- lib/connectors/memory.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/connectors/memory.js b/lib/connectors/memory.js index eefd8721..50f73c6a 100644 --- a/lib/connectors/memory.js +++ b/lib/connectors/memory.js @@ -21,13 +21,13 @@ function Memory(m) { this.isTransaction = true; this.cache = m.cache; this.ids = m.ids; - Connector.apply(this, [].slice.call(arguments)); + this.constructor.super_.apply(this, [].slice.call(arguments)); this._models = m._models; } else { this.isTransaction = false; this.cache = {}; this.ids = {}; - Connector.apply(this, [].slice.call(arguments)); + this.constructor.super_.apply(this, [].slice.call(arguments)); } } @@ -41,9 +41,9 @@ Memory.prototype.connect = function(callback) { } }; -Memory.prototype.define = function defineModel(descr) { - var m = descr.model.modelName; - Connector.prototype.define.apply(this, [].slice.call(arguments)); +Memory.prototype.define = function defineModel(definition) { + this.constructor.super_.prototype.define.apply(this, [].slice.call(arguments)); + var m = definition.model.modelName; this.cache[m] = {}; this.ids[m] = 1; };