Set up connector/adapter when postInit is not called

This commit is contained in:
Raymond Feng 2013-07-23 12:05:08 -07:00
parent 6af4b1ba2f
commit 9b169efc8c
1 changed files with 7 additions and 1 deletions

View File

@ -61,7 +61,10 @@ function DataSource(name, settings) {
this._operations = {};
this.setup(name, settings);
this.connector = this.connector || this.adapter;
this.adapter = this.connector; // Keep the adapter as an alias to connector
// connector
var connector = this.connector;
@ -971,6 +974,9 @@ DataSource.prototype.log = function (sql, t) {
* Freeze dataSource. Behavior depends on connector
*/
DataSource.prototype.freeze = function freeze() {
if (this.connector.freezeDataSource) {
this.connector.freezeDataSource();
}
if (this.connector.freezeSchema) {
this.connector.freezeSchema();
}