strapi

Is there a way to populate nested relations in Strapi?


Already had a look at this other question, but it didn't seem to work for me.

Problem

So in the video (referenced below) at 9:58, he gets the Menu but the Section DOES NOT HAVE LINKS. Is there a way to populate them from the Menu?

Where it comes from

I was watching this video from Strapi on Youtube in which he creates a Menu. The Menu has the following components:

Also, a Dropdown has a one-to-many relation with Section, which contains multiple Link components.

Something like this:

Menu schema

Thanks.


Solution

  • You will have to build a custom controller in order to populate nested relations in strapi.

    Only solution that I found working is this.