From 4387957a45241ff4c124c8f4cd0f4826b9ddf9be Mon Sep 17 00:00:00 2001 From: Clark Wang Date: Mon, 1 Sep 2014 13:55:53 +0800 Subject: [PATCH] Restrict: only hasManyThrough relation can have additional properties Signed-off-by: Clark Wang --- lib/models/model.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/models/model.js b/lib/models/model.js index 3e7a30c6..0bded386 100644 --- a/lib/models/model.js +++ b/lib/models/model.js @@ -429,6 +429,7 @@ Model.hasManyRemoting = function (relationName, relation, define) { var accepts = []; if (relation.type === 'hasMany' && relation.modelThrough) { + // Restrict: only hasManyThrough relation can have additional properties accepts.push({arg: 'data', type: modelThrough.modelName, http: {source: 'body'}}); }