±-------------------------------------------------------+
| Company class |
±---------±--------------±----------±----------------+
| objectId | category (Category Pointer) | name | subCategory (subCategory Relation) |
±---------±--------------±----------±----------------+
±----------------------------------------------------------------------------------+
| SubCategory class |
±---------±-------------------------±--------------±----------±----------------+
| objectId | name | category (Category Pointer)|
±---------±-------------------------±--------------±----------±----------------+
Relation between of Company and SubCategory is mant-to-many
I want to get all companies with belongs to specific category and match specific subcategory using lookup aggregation query.
Please help me. Thanks all.