MongoShell populate is not function?

83 Views Asked by At

i am working with MongoDB. i came across with an issue that i was trying to query data through MongoShell. but when i tried to run "populate" query from MongoShell, i gave error ".populate is not a function". why populate query is not working in MongoShell. i studied an article it says that populate is the function which is provided by mongoose library for Nodejs only, its not native supported by MongoDB. but in another article its mentioned that "populate" query is supported by MongoDB version above 4.2. i have version 7. but i'm still getting this error, I do not know why?

1

There are 1 best solutions below

0
Muhammad Afshal On

i found it there

populate() is provided by mongoose library, its not provided by mongodb. its not available in mongoshell functions as well.