Merge pull request #280 from clarkorz/fix/typo-keyThrough

Fix typo of keyThrough and get from params
This commit is contained in:
Raymond Feng 2014-09-02 08:28:09 -07:00
commit c71a4ba85a
1 changed files with 1 additions and 1 deletions

View File

@ -572,7 +572,7 @@ RelationDefinition.hasMany = function hasMany(modelFrom, modelTo, params) {
definition.modelThrough = params.through; definition.modelThrough = params.through;
var keyThrough = definition.throughKey || i8n.camelize(modelTo.modelName + '_id', true); var keyThrough = params.keyThrough || i8n.camelize(modelTo.modelName + '_id', true);
definition.keyThrough = keyThrough; definition.keyThrough = keyThrough;
modelFrom.relations[relationName] = definition; modelFrom.relations[relationName] = definition;