fix foreign key dataType bug

This commit is contained in:
didikeke 2015-03-11 11:30:40 +08:00
parent 159be756ac
commit 3644b85432
1 changed files with 1 additions and 1 deletions

View File

@ -1710,7 +1710,7 @@ DataSource.prototype.defineForeignKey = function defineForeignKey(className, key
}
var fkDef = {type: pkType};
var foreignMeta = this.columnMetadata(foreignClassName, key);
var foreignMeta = this.columnMetadata(foreignClassName, pkName);
if(foreignMeta && foreignMeta.dataType) {
fkDef[this.connector.name] = {};
fkDef[this.connector.name].dataType = foreignMeta.dataType;