SOLVED
with a non-owner variable like this
@ManyToMany(fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, mappedBy = "listaProdotti")
@JsonBackReference
private Set<Ordini> ordini;
and an owner variable like this
@ManyToMany
@Valid
private Set<Prodotti> listaProdotti = new HashSet<>();