Use super_ to call the base class

This commit is contained in:
Raymond Feng 2013-10-03 09:14:24 -07:00
parent 691743493c
commit d0cdbd84ea
1 changed files with 5 additions and 5 deletions

View File

@ -21,13 +21,13 @@ function Memory(m) {
this.isTransaction = true; this.isTransaction = true;
this.cache = m.cache; this.cache = m.cache;
this.ids = m.ids; this.ids = m.ids;
Connector.apply(this, [].slice.call(arguments)); this.constructor.super_.apply(this, [].slice.call(arguments));
this._models = m._models; this._models = m._models;
} else { } else {
this.isTransaction = false; this.isTransaction = false;
this.cache = {}; this.cache = {};
this.ids = {}; 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) { Memory.prototype.define = function defineModel(definition) {
var m = descr.model.modelName; this.constructor.super_.prototype.define.apply(this, [].slice.call(arguments));
Connector.prototype.define.apply(this, [].slice.call(arguments)); var m = definition.model.modelName;
this.cache[m] = {}; this.cache[m] = {};
this.ids[m] = 1; this.ids[m] = 1;
}; };