From b4c9cb5e99a09e20b82c46ff23810030e2c1e547 Mon Sep 17 00:00:00 2001 From: leon3s Date: Tue, 6 Nov 2018 17:29:14 +0100 Subject: [PATCH] [ BUGFIX ] maxDepthOfQuery config --- lib/dao.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/dao.js b/lib/dao.js index 959a734e..da9a6546 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -1705,7 +1705,12 @@ DataAccessObject._sanitizeQuery = function(query, options) { DataAccessObject._sanitizeData = function(data, options) { options = options || {}; - return sanitizeQueryOrData(data, options); + // See https://github.com/strongloop/loopback-datasource-juggler/issues/1651 + var maxDepthOfQuery = (+this._getSetting('maxDepthOfQuery')) || 12; + return sanitizeQueryOrData(data, + Object.assign({ + maxDepth: maxDepthOfQuery, + }, options)); }; /*