Populate FROM embedded documents?

Can you populate USING values FROM an embedded schema?

For instance say I have an object called Person, that has key “Fruits” and Fruits is an array of embedded objects with the Fruit Schema.

Then say there’s another object, Shop, with an array of ObjectIds:

SoldFruit: [ObjectId].

The Object ids match the FruitIDs (the embedded objects).

Can I shop.populate(SoldFruit)? and have it fetch the embedded fruit objects in Person?

2 Likes