Create entry with repeatable component inside

Found the issue and the solution.
The problem was that I was using strapi.db.query and that does not seem to insert nested component objects.
The solution is to use strapi.entityService.create... :

const createdQ = await strapi.entityService.create('api::question.question', {
    data: {
    "id": 3,
    "name": "Q 1.2.1",
    "required": true,
    "createdAt": "2022-05-04T08:41:27.948Z",
    "updatedAt": "2022-05-04T09:13:35.067Z",
    "options": [
      {
        "id": 17,
        "value": "test value",
        "text_type": null
      }
    ]
  }
});
1 Like