Use super_ to call the base class
This commit is contained in:
parent
691743493c
commit
d0cdbd84ea
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue