I want a search function that can search the Manufacturer's applications's properties.
But when I using find function of Model to deal with the columns like applications.$.name, the data has not been populated.
So I want to ask, is there a function that can extract the path whose type is ref ObjectId? That way, I can separate them out of columns and normal columns before finding them.
I also need a function that can search in the result array, it needs to support the dot operator etc. Mongoose features. I don't want to build another wheel myself......
Do you want to request a feature or report a bug?
feature
What is the current behavior?
None
If the current behavior is a bug, please provide the steps to reproduce.
None
What is the expected behavior?
My models:
I want a search function that can search the Manufacturer's applications's properties.
But when I using
find
function ofModel
to deal with the columns likeapplications.$.name
, the data has not been populated.So I want to ask, is there a function that can extract the path whose type is ref ObjectId? That way, I can separate them out of columns and normal columns before finding them.
I also need a function that can search in the result array, it needs to support the dot operator etc. Mongoose features. I don't want to build another wheel myself......
e.g.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose : 6.1.8 Node.js : 16.13.2