your values in your documents are no longer a collection of ids after population. they now are objects with their own _id fields and you now need to query them accordingly.
- “department._id”
- “category._id”
- “variations.color._id”
- “variations.size._id”
by the way, it is weird your id values seem to be stored as mere strings, not as $oid as you showed previously. are you using versioning in models and queries? try to get also another sample with __v:1 for example and see how they differ.
one more thing about formatting your posts. they are long and makes it hard to follow when someone new comes in. from the
icon in the editor, select “Hide Details” and put your “code” sections in it and edit the text it show to reflect the content. chek the below one for example.
Click here to see hidden detail I mentioned
this way it will be easier to read when your sample code starts to be lengthy