Fix the discover keys

This commit is contained in:
Raymond Feng 2013-05-13 22:10:10 -07:00
parent e207628538
commit 3d82fc10b9
1 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ Schema.prototype.discoverModelProperties = function (options, cb) {
Schema.prototype.discoverPrimaryKeys= function(owner, table, cb) {
this.freeze();
if (this.adapter.discoverPrimaryKeys) {
this.adapter.discoverPrimaryKeys(options, cb);
this.adapter.discoverPrimaryKeys(owner, table, cb);
} else if (cb) {
cb();
}
@ -470,7 +470,7 @@ Schema.prototype.discoverPrimaryKeys= function(owner, table, cb) {
Schema.prototype.discoverForeignKeys= function(owner, table, cb) {
this.freeze();
if (this.adapter.discoverForeignKeys) {
this.adapter.discoverForeignKeys(options, cb);
this.adapter.discoverForeignKeys(owner, table, cb);
} else if (cb) {
cb();
}