Fix typo of keyThrough and get from params

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
This commit is contained in:
Clark Wang 2014-09-02 21:57:24 +08:00
parent d7598b18f4
commit 4d5f3835bb
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;
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;