Can't populate many to many relation

System Information
  • Strapi Version: 4.1.5
  • Database: Postgresql 13

that’s my first item

{
  "kind": "collectionType",
  "collectionName": "monuments",
  "info": {
    "singularName": "monument",
    "pluralName": "monuments",
    "displayName": "Monuments",
    "description": ""
  },
  "options": {
    "draftAndPublish": true
  },
  "pluginOptions": {},
  "attributes": {
    "title": {
      "type": "string"
    },
    "rocks": {
      "type": "relation",
      "relation": "manyToMany",
      "target": "api::rock.rock",
      "mappedBy": "monuments"
    },
  }
}

thats my second item

{
  "kind": "collectionType",
  "collectionName": "rocks",
  "info": {
    "singularName": "rock",
    "pluralName": "rocks",
    "displayName": "Rocks",
    "description": ""
  },
  "options": {
    "draftAndPublish": false
  },
  "pluginOptions": {},
  "attributes": {
    "title": {
      "type": "string"
    },
    "monuments": {
      "type": "relation",
      "relation": "manyToMany",
      "target": "api::monument.monument",
      "inversedBy": "rocks"
    }
  }
}

query:

http://localhost:1337/api/monuments/1?[populate]=*
{
    "data": {
        "id": 1,
        "attributes": {
            "title": "Monolith",
            "createdAt": "2022-03-11T12:00:14.807Z",
            "updatedAt": "2022-03-16T14:32:52.005Z",
            "publishedAt": "2022-03-11T12:00:15.953Z",
          } 
        }
    },
    "meta": {}
}

How to get relation populated, the modding controllers is the only way?

Perfect: