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.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;
};