Merge pull request #280 from clarkorz/fix/typo-keyThrough
Fix typo of keyThrough and get from params
This commit is contained in:
commit
c71a4ba85a
|
@ -572,7 +572,7 @@ RelationDefinition.hasMany = function hasMany(modelFrom, modelTo, params) {
|
|||
|
||||
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;
|
||||
|
||||
modelFrom.relations[relationName] = definition;
|
||||
|
|
Loading…
Reference in New Issue