JKHeadley/rest-hapi

Add option to populate subdocs

Open

#104 opened on Apr 18, 2018

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (156 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (1,181 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Via this comment:

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