Two 1:n relations to same entity

  • Node.js version: v18.12.1
  • NPM version: 9.6.7
  • Strapi version: 4.11.1
  • Database: mariadb 10.x
  • Operating system: Debian bullseye (11)
  • Is your project Javascript or Typescript: Typescript

Description

We have two collection types. One called Infobox and the other User Segment.
The collection type Infobox has two fields called IncludeUserSegment and ExcludeUserSegment.
Both of them are 1:n relations to User Segment.

Within the Swagger documentation and the incoming responses im frontend both are missing the data for the field ExcludeUserSegment while IncludeUserSegment is working just fine:

{
  "data": [
    {
      "id": 0,
      "attributes": {
        "Text": "string",
        "URL": "string",
        "CTA": "string",
        "IncludeUserSegment": {
          "data": [
            {
              "id": 0,
              "attributes": {
                "Name": "string",
                "Typ": "Neukunde",
                "createdAt": "2023-07-03T14:22:33.095Z",
                "updatedAt": "2023-07-03T14:22:33.095Z",
                "publishedAt": "2023-07-03T14:22:33.095Z",
                "createdBy": {
                  "data": {
                    "id": 0,
                    "attributes": {
                      "firstname": "string",
                      "lastname": "string",
                      "username": "string",
                      "email": "user@example.com",
                      "resetPasswordToken": "string",
                      "registrationToken": "string",
                      "isActive": true,
                      "roles": {
                        "data": [
                          {
                            "id": 0,
                            "attributes": {
                              "name": "string",
                              "code": "string",
                              "description": "string",
                              "users": {
                                "data": [
                                  {
                                    "id": 0,
                                    "attributes": {}
                                  }
                                ]
                              },
                              "permissions": {
                                "data": [
                                  {
                                    "id": 0,
                                    "attributes": {
                                      "action": "string",
                                      "subject": "string",
                                      "properties": "string",
                                      "conditions": "string",
                                      "role": {
                                        "data": {
                                          "id": 0,
                                          "attributes": {}
                                        }
                                      },
                                      "createdAt": "2023-07-03T14:22:33.095Z",
                                      "updatedAt": "2023-07-03T14:22:33.095Z",
                                      "createdBy": {
                                        "data": {
                                          "id": 0,
                                          "attributes": {}
                                        }
                                      },
                                      "updatedBy": {
                                        "data": {
                                          "id": 0,
                                          "attributes": {}
                                        }
                                      }
                                    }
                                  }
                                ]
                              },
                              "createdAt": "2023-07-03T14:22:33.095Z",
                              "updatedAt": "2023-07-03T14:22:33.095Z",
                              "createdBy": {
                                "data": {
                                  "id": 0,
                                  "attributes": {}
                                }
                              },
                              "updatedBy": {
                                "data": {
                                  "id": 0,
                                  "attributes": {}
                                }
                              }
                            }
                          }
                        ]
                      },
                      "blocked": true,
                      "preferedLanguage": "string",
                      "createdAt": "2023-07-03T14:22:33.095Z",
                      "updatedAt": "2023-07-03T14:22:33.095Z",
                      "createdBy": {
                        "data": {
                          "id": 0,
                          "attributes": {}
                        }
                      },
                      "updatedBy": {
                        "data": {
                          "id": 0,
                          "attributes": {}
                        }
                      }
                    }
                  }
                },
                "updatedBy": {
                  "data": {
                    "id": 0,
                    "attributes": {}
                  }
                }
              }
            }
          ]
        },
        "Position": {
          "data": {
            "id": 0,
            "attributes": {
              "Name": "string",
              "slug": "string",
              "createdAt": "2023-07-03T14:22:33.095Z",
              "updatedAt": "2023-07-03T14:22:33.095Z",
              "publishedAt": "2023-07-03T14:22:33.095Z",
              "createdBy": {
                "data": {
                  "id": 0,
                  "attributes": {}
                }
              },
              "updatedBy": {
                "data": {
                  "id": 0,
                  "attributes": {}
                }
              }
            }
          }
        },
        "ExcludeUserSegment": {
          "data": [
            {
              "id": 0,
              "attributes": {}
            }
          ]
        },
        "createdAt": "2023-07-03T14:22:33.095Z",
        "updatedAt": "2023-07-03T14:22:33.095Z",
        "publishedAt": "2023-07-03T14:22:33.095Z",
        "createdBy": {
          "data": {
            "id": 0,
            "attributes": {}
          }
        },
        "updatedBy": {
          "data": {
            "id": 0,
            "attributes": {}
          }
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 0,
      "pageSize": 25,
      "pageCount": 1,
      "total": 0
    }
  }
}

Expected behavior:

ExcludeUserSegment should deliver the data in the same format as IncludeUserSegment.