Closed luizsandoval closed 2 years ago
Hello,
I have a data structure as follows:
Where fields is an array of objects containing a field that is an ObjectId that references to another collection.
fields
field
ObjectId
I'm trying to populate fields.field using the nested populate syntax populate=fields.field, but mongoose-query-parser outputs the following:
fields.field
populate=fields.field
mongoose-query-parser
When what I really want is:
{ populate: [ { path: 'fields.field' } ] }
Am I doing something wrong? Can this feature be implemented?
Best regards,
Luiz Sandoval.
I found out my mongoose schema was wrong.
Hello,
I have a data structure as follows:
Where
fields
is an array of objects containing afield
that is anObjectId
that references to another collection.I'm trying to populate
fields.field
using the nested populate syntaxpopulate=fields.field
, butmongoose-query-parser
outputs the following:When what I really want is:
Am I doing something wrong? Can this feature be implemented?
Best regards,
Luiz Sandoval.