Monday, 3 April 2017

How to query main collection with another collection [Mongoose]

If I have 2 collection:

product and category product have ref on category...

How can query products by category?

I need something like this:

Product.find({category.name: "testCat"}, function() {
...
})

Any solution for this?



via Vladimir Djukic

No comments:

Post a Comment