Many-to-many relationship with extra columns, Hibernate, Spring-boot and postgres configurations

Solution for Many-to-many relationship with extra columns, Hibernate, Spring-boot and postgres configurations
is Given Below:

hi and thanks in advice for your help, i have a db with two entities: progetti and figura professionale and i want to create a many to many relationship between them, the tricky part is that in the relationship i have to insert some other columns, so i followed some tutorial and some other question here on stack overflow and i come out to this:
figura professionale:

@Entity  
@Table(name="figura_professionale")
public class figura_professionale {
   @Id
   @Column(name="id_fig")
   @GeneratedValue(strategy=GenerationType.IDENTITY)
   private int id;//

   @Column(name="nome_fig")
   private String nome;//

   @Column(name="descrizione")
   private String descrizione;//
   
   //lista di progetti
   @ManyToMany(mappedBy="SetFigProf")
   @JsonIgnore
   private Set<progetto> setProgetti= new HashSet<>();

   @OneToMany(mappedBy="figprof", cascade = CascadeType.ALL) **//here is my relationship**
   private Set<effort_fp> effortfps= new HashSet<>();
   
**getters and setters**
} 

progetti

@Entity
@Table(name = "progetto")
public class progetto {
    @Id
    @Column(name = "id_prog")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;//

    @Column(name = "nome")
    private String nome;//

    // lista di competenze
    @ManyToMany(cascade = { CascadeType.DETACH, CascadeType.MERGE, CascadeType.REMOVE, CascadeType.REFRESH })
    @JoinTable(name = "progetto_competenze_mapping", joinColumns = @JoinColumn(name = "id_prog"), inverseJoinColumns = @JoinColumn(name = "id_comp"))
    @JsonIgnore
    private Set<competenza> setCompetenze_prog = new HashSet<>();

    // lista di figure professionali
    @ManyToMany(cascade = { CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH })
    @JoinTable(name = "prog_figprof_mapping", joinColumns = @JoinColumn(name = "id_prog"), inverseJoinColumns = @JoinColumn(name = "id_fig_prof"))
    @JsonIgnore
    private Set<figura_professionale> SetFigProf = new HashSet<>();//

    // cliente che commissiona il progetto
    @ManyToOne
    @JoinColumn(name = "id_cli")
    @JsonIgnore
    private cliente cliente;//

    // lista dei progetti che il gruppo è autorizzato a fare
    @ManyToMany(cascade = { CascadeType.DETACH, CascadeType.MERGE, CascadeType.REMOVE, CascadeType.REFRESH })
    @JoinTable(name = "gruppi_prog_mapping", joinColumns = @JoinColumn(name = "id_prog"), inverseJoinColumns = @JoinColumn(name = "id_gr"))
    @JsonIgnore
    private Set<gruppo> listaGruppi = new HashSet<>();//

    // lista degli effort_fp
    @OneToMany(mappedBy = "progetto", cascade = CascadeType.ALL) //other relationship
    private Set<effort_fp> effortfps = new HashSet<>();

**getters and setters**

effort fp

@Entity
@Table(name="effort_fp")
public class effort_fp {
    @Id
    @Column(name="id_effortfp")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private int id;

    @ManyToOne
    @JoinColumn(name="id_fp")
    @JsonIgnore
    private figura_professionale figprof;
    
    @ManyToOne
    @JoinColumn(name="id_prog")
    @JsonIgnore
    private progetto progetto;

    @Column(name="mese")
    private int mese;

    @Column(name="giornimeseprog")
    private int giornidisp;

    @Column(name="anno")
    private int anno;

**getters and setters**

i’m also using postman for send the datas in json format to an endpoint that i created(i did it many other times in this project, i will post it here):

{
    "id":0,
    "figprof":
    {"id":8,
    "nome":"temp3",
    "descrizione":"t3"},
    "progetto":
    {
    "id": 16,
    "nome": "protemp2",
    "effortfps": [],
    "setFigProf": [
        {
            "id": 8,
            "nome": "temp3",
            "descrizione": "temporaneo",
            "effortfps": []
        }
    ]
},
    "mese":1,
    "giornidisp":21,
    "anno":2021
}

i’m not sure that the json is logically correct but that’s just one of the many attempts that i made and in any case the springboot’s console comes out with the same error:

ERROR 1416 — [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement] with root cause

org.postgresql.util.PSQLException: ERROR: null values in the column “id_prog” violates the not null constraints
Dettaglio: La riga in errore contiene (null, null, 1, 21, 2021, 36).

so that makes me think that somehow springboot can’t read my entities progetto and figura professionale from the very beginning of my http post request. do you guys know what’s my error?? thanks again, any help is appretiated, i’m very stuck rn.