From 4d5f3835bb97c8a16dd55da862965d965ff336cd Mon Sep 17 00:00:00 2001 From: Clark Wang Date: Tue, 2 Sep 2014 21:57:24 +0800 Subject: [PATCH] Fix typo of keyThrough and get from params Signed-off-by: Clark Wang --- lib/relation-definition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/relation-definition.js b/lib/relation-definition.js index a6a3f0a7..3c22e651 100644 --- a/lib/relation-definition.js +++ b/lib/relation-definition.js @@ -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;