Creating a relation inside a component in User (up)

System Information
  • Strapi Version: 4.24.3
  • Operating System: Windows 11
  • Database: MySQL
  • Node Version: 20.12.1
  • NPM Version: 10.8.0

I am trying to create a new entry for a nested component in up_users.

  • Collection-Type: User
    • Component: Education
      • Repeatable Component: Grades education.grades
        • String: Name
        • Date: Date
        • Relation oneToOne: Subject

If I add a new entry, I am able to save the data for String and Date without problems via fetch and PUT it via json string as response in the body. But I don’t think this way provides a solution for my problem.

What is the recommended way to also set the relation?

I am not sure but thought about first GET all subjects, let the user in the frontend select, then find the id of the selected subject and set this id with Strapi Entity API as reference for the relation with data : {…, …, subject: subject_id} in the strapi.entityService