It seems there is only this line in Training to hold the relationship:
"modules": {
"collection": "modules"
},
This is formation.settings.json
(aka training) :
{
"kind": "singleType",
"collectionName": "formation",
"info": {
"name": "formation",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": false
},
"attributes": {
"titre": {
"type": "string",
"required": true
},
"seo": {
"type": "component",
"repeatable": false,
"component": "meta.seo"
},
"competencesTitre": {
"type": "string"
},
"atouts": {
"type": "component",
"repeatable": true,
"component": "interface.atout"
},
"moduleIntros": {
"type": "component",
"repeatable": true,
"component": "global.module-intro"
},
"modules": {
"collection": "modules"
},
"competences": {
"type": "component",
"repeatable": true,
"component": "global.module-intro"
},
"candidater_CTA": {
"type": "string"
},
"image": {
"model": "file",
"via": "related",
"allowedTypes": [
"files",
"images",
"videos"
],
"plugin": "upload",
"required": true
}
}
}
and modules.settings.json
:
{
"kind": "collectionType",
"collectionName": "modules",
"info": {
"name": "modules",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"attributes": {
"titre": {
"type": "string"
},
"type": {
"type": "enumeration",
"enum": [
"transverse",
"professionalisation"
],
"required": true
},
"resume": {
"type": "text"
},
"heures": {
"type": "integer"
},
"ues": {
"type": "component",
"repeatable": true,
"component": "global.module-intro"
},
"ordre": {
"type": "decimal"
}
}
}