Why doesn't the "required: true" work for api relationships?

System Information
  • Strapi Version: 4.15.5
  • Operating System: MacOS Sonoma
  • Database: PostgreSQL
  • Node Version: 20.9
  • NPM Version: 10.1.0
  • Yarn Version: N/A (not using it)

The Strapi admin interface, specifically, the Content-Type Builder allows us to change certain properties of the tables or api entities (btw, does it also change the tables or just the API definitions in the code, which I know it does).

In particular, it allows us to make certain fields required, which is great.

However, it does not allow us to do this for the relationships.

So, basically, I have 2 collection types: A and B, where A has one B. There’s no way in the Strapi admin interface to force the user to always insert a B.

Why is that? Is this a bug?

If I change the A’s API definition in the code to

    "B": {
      "type": "relation",
      "relation": "oneToOne",
      "target": "api::B.B",
      "required": true

The interface shows the asterisk (which suggests that it’s required), but when I create an entity of type A, I still can create it without specifying a B, i.e. required: true has no effect.

Can you please fix this bug? I really need this feature.

Is there a way to do this meanwhile?