Move the _operations={} up
This commit is contained in:
parent
72e8e7230f
commit
3b731b1a12
|
@ -55,6 +55,11 @@ function DataSource(name, settings) {
|
||||||
return new DataSource(name, settings);
|
return new DataSource(name, settings);
|
||||||
}
|
}
|
||||||
ModelBuilder.call(this, arguments);
|
ModelBuilder.call(this, arguments);
|
||||||
|
|
||||||
|
// operation metadata
|
||||||
|
// Initialize it before calling setup as the adapter might register operations
|
||||||
|
this._operations = {};
|
||||||
|
|
||||||
this.setup(name, settings);
|
this.setup(name, settings);
|
||||||
|
|
||||||
// connector
|
// connector
|
||||||
|
@ -64,9 +69,7 @@ function DataSource(name, settings) {
|
||||||
this.DataAccessObject = (connector && connector.DataAccessObject) ? connector.DataAccessObject : this.constructor.DataAccessObject;
|
this.DataAccessObject = (connector && connector.DataAccessObject) ? connector.DataAccessObject : this.constructor.DataAccessObject;
|
||||||
this.DataAccessObject.call(this, arguments);
|
this.DataAccessObject.call(this, arguments);
|
||||||
|
|
||||||
// operation metadata
|
|
||||||
this._operations = {};
|
|
||||||
|
|
||||||
// define DataAccessObject methods
|
// define DataAccessObject methods
|
||||||
Object.keys(this.DataAccessObject).forEach(function (name) {
|
Object.keys(this.DataAccessObject).forEach(function (name) {
|
||||||
var fn = this.DataAccessObject[name];
|
var fn = this.DataAccessObject[name];
|
||||||
|
|
Loading…
Reference in New Issue