pangea-server 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -220,14 +220,12 @@ function getIncludeAndWhere(model, includeItems, where, relDepth = new Map(), pa
|
|
|
220
220
|
const newRelDepth = new Map(relDepth);
|
|
221
221
|
newRelDepth.set(relKey, currentDepth + 1);
|
|
222
222
|
const relModel = rel.getModelFn();
|
|
223
|
-
const nestedResult = getIncludeAndWhere(relModel, nestedIncludeItems, relWhere, newRelDepth, relKey);
|
|
224
223
|
includeOptions.push({
|
|
225
224
|
model: relModel,
|
|
226
225
|
as: relName,
|
|
227
226
|
required: rel.required,
|
|
228
227
|
paranoid: rel.paranoid,
|
|
229
|
-
|
|
230
|
-
...(nestedResult.where && { where: nestedResult.where }),
|
|
228
|
+
...getIncludeAndWhere(relModel, nestedIncludeItems, relWhere, newRelDepth, relKey),
|
|
231
229
|
});
|
|
232
230
|
}
|
|
233
231
|
return {
|