Thanks to both of you.
Here is a copy of my models files :
events.settings.json
{
"kind": "collectionType",
"collectionName": "events",
"info": {
"name": "Events"
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": false
},
"attributes": {
"event_name": {
"type": "string"
},
"event_iteration": {
"type": "component",
"repeatable": true,
"component": "entity.event-entity"
}
}
}
components/entity/event-entity.json
{
"collectionName": "components_entity_event_entities",
"info": {
"name": "Event_entity",
"icon": "arrow-right"
},
"options": {},
"attributes": {
"name": {
"type": "string"
},
"illustration": {
"model": "file",
"via": "related",
"allowedTypes": [
"images",
"files",
"videos"
],
"plugin": "upload",
"required": false
},
"main_pictures": {
"type": "component",
"repeatable": false,
"component": "content.content"
},
"additional_pictures": {
"type": "component",
"repeatable": false,
"component": "content.content"
}
}
}
Also when it comes to relations, it’s generally my suggestion to use a SQL database as we are aware of some pain points when it comes to relation population performance on MongoDB.
Good to know for my next projects. ![]()