Merge pull request #498 from didikeke/master

fix foreign key dataType bug
This commit is contained in:
Raymond Feng 2015-03-10 21:22:51 -07:00
commit 9083370e17
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 fkDef = {type: pkType};
var foreignMeta = this.columnMetadata(foreignClassName, key); var foreignMeta = this.columnMetadata(foreignClassName, pkName);
if(foreignMeta && foreignMeta.dataType) { if(foreignMeta && foreignMeta.dataType) {
fkDef[this.connector.name] = {}; fkDef[this.connector.name] = {};
fkDef[this.connector.name].dataType = foreignMeta.dataType; fkDef[this.connector.name].dataType = foreignMeta.dataType;