JKHeadley / JKHeadley/rest-hapi
Add option to populate subdocs
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
Via [this comment](https://github.com/JKHeadley/rest-hapi/issues/102#issuecomment-382386363):
> It would be great if there were some way to specify an embed of 'subdoc.pets' that made populateEmbeddedDocs call .populate({ path: 'subdoc.pets' }) instead of .populate({ path: 'subdoc', populate: { path: 'pets' } }).
Need to develop syntax to specify between the two, ex: `subdoc.pets` vs `subdoc:pets`
Contributor guide
Research direction
Locate populateEmbeddedDocs and trace how embed paths are parsed and passed to populate. Decide how the proposed dot-versus-colon syntax selects the two population forms, then verify that both subdoc.pets and subdoc:pets produce the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100