Fix typo of keyThrough and get from params
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
This commit is contained in:
parent
d7598b18f4
commit
4d5f3835bb
|
@ -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