System Information
- Strapi Version: 3.6.8
- Operating System:
- Database: Postgres
- Node Version: 14
- NPM Version:
- Yarn Version:
Hi I am having an issue with linked model attributes not populating in the response.
To further explain my issue in detail,
I have a collection type as below:
{
"collectionName": "components_contentblocks_main_collection_type",
"info":
"name": "DisplayName",
"icon": "address-book",
"description": ""
},
"options": {},
"attributes": {
"ComponentName": {
"type": "component",
"repeatable": false,
"component": "elements.component_type"
}
}
}
And my element definition looks like this:
{
"collectionName": "components_elements_component_type",
"info": {
"name": "DisplayNameOfType",
"icon": "microscope",
"description": ""
},
"options": {},
"attributes": {
...otherAttributes,
"nestedAttributeOfSameType": {
"model": "model-of-main-collection-type"
},
}
}
nestedAttributeOfSameType comes as null in the response. However on admin console this link is visible and I can view the content from the panel. I don’t understand why this is happening because other linked model attributes populates fine without any issue. My guess is this is a nested data issue
The use case of this we have multiple articles that contain a link to another article within the same collection.