Automattic / Automattic/mongoose

Remove dependency on populating top-level document paths

Open
#8,298 0 comments 0 reactions 1 assignee Claimed by @vkarpov15 View on GitHub
refactor
Dominant language
JavaScript
Stars
27.5k
Forks
4k
Avg merge
2d 7h
Merged PRs (30d)
35

Description

Re: #8273 and #8247, it looks like we sometimes depend on setting `populated()` in the top-level document (https://github.com/Automattic/mongoose/blob/dfde779139a41820ddfb55dc7f088636e80e9f0f/lib/document.js#L1151-L1159) and sometimes we don't (https://github.com/Automattic/mongoose/blob/dfde779139a41820ddfb55dc7f088636e80e9f0f/lib/document.js#L1137-L1139) . The latter is the better approach because once you have populated paths within a document array, or populated paths within a single nested doc within an array, it becomes increasingly difficult to figure out populated values for the subdocument you're looking at.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.