Thursday, 1 February 2018

Have problems with mongoose schema and reference

My brandSchema: http://ift.tt/2E54ilL My categorySchema: http://ift.tt/2FBlDjf problem is. when I run:brandSchema.find({'category._id': (req.query.category)}) .exec((err, result)=>{ if(err){ console.log(err) } else { res.send({result: result}) }
I get empty result array.Can somebody point out my problem?

Submitted February 01, 2018 at 02:33PM by mclovin4009

No comments:

Post a Comment