Hi Ajisilva
,
I’ve added the following code to the controller of “products”. The code will populate the relation field “category” and the deep nested relation “gender” which is attached to “category”. Should work with Mongoose as a database.
async find(ctx) {
return strapi
.query("products")
.find(ctx.query, [
{
path: "category",
populate: {
path: "gender"
}
}
]);
}
Good luck!