Suppose we have a schema A which looks like:
{ b: { type: Schema.Types.ObjectId, ref: 'B' },
a type B which looks like:
{ c: { type: Schema.Types.ObjectId, ref: 'C' },
and a type C which looks like:
{ name: String }.
Is there any way to use MongooseJS’ populate utility to get at documents through multiple refs? In the example, we could find A’s b by doing
A.findOne({ id: someId })
.populate('b')
...
but could we get at b’s c through A?
Not currently. Some support for this is coming soon.