Merge pull request #2199 from payloadcms/fix/#2150-nth-level-querying

fix: #2150, can now query on N number of levels deep
This commit is contained in:
James Mikrut
2023-02-27 16:33:49 -05:00
committed by GitHub
2 changed files with 86 additions and 1 deletions

View File

@@ -266,8 +266,10 @@ class ParamParser {
if (collectionPathsToSearch.length === 1) return { path, value: { $in } };
const nextSubPath = collectionPathsToSearch[i + 1].path;
return {
value: { _id: { $in } },
value: { [nextSubPath]: { $in } },
};
}