我遇到的问题是,在获取数据后,响应中不存在任何关系字段。当我查看具有关系的模式之一的模式时,我发现关系字段存在于属性对象中。但我的回复中仍然只得到非关系字段。
这是我的模式之一
{
"kind": "collectionType",
"collectionName": "activities",
"info": {
"singularName": "activity",
"pluralName": "activities",
"displayName": "activity"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string"
},
"date": {
"type": "date"
},
"subcategory": {
"type": "relation",
"relation": "oneToOne",
"target": "api::subcategory.subcategory"
},
"members": {
"type": "relation",
"relation": "manyToMany",
"target": "api::member.member",
"inversedBy": "activities"
}
}
}
Run Code Online (Sandbox Code Playgroud)