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);
|
||||
}
|
||||
ModelBuilder.call(this, arguments);
|
||||
|
||||
// operation metadata
|
||||
// Initialize it before calling setup as the adapter might register operations
|
||||
this._operations = {};
|
||||
|
||||
this.setup(name, settings);
|
||||
|
||||
// connector
|
||||
|
@ -64,9 +69,7 @@ function DataSource(name, settings) {
|
|||
this.DataAccessObject = (connector && connector.DataAccessObject) ? connector.DataAccessObject : this.constructor.DataAccessObject;
|
||||
this.DataAccessObject.call(this, arguments);
|
||||
|
||||
// operation metadata
|
||||
this._operations = {};
|
||||
|
||||
|
||||
// define DataAccessObject methods
|
||||
Object.keys(this.DataAccessObject).forEach(function (name) {
|
||||
var fn = this.DataAccessObject[name];
|
||||
|
|
Loading…
Reference in New Issue