79519574

Date: 2025-03-19 08:37:07
Score: 0.5
Natty:
Report link

if you using @JsonIgnore resultList can't make items.

    @ManyToMany(fetch = FetchType.EAGER)
    @JoinTable(
            name = "usuario_vivienda",
            joinColumns = @JoinColumn(name = "usuario_id"),
            inverseJoinColumns = @JoinColumn(name = "vivienda_id")
    )
    @JsonIgnore
    private Set<Vivienda> viviendas;

but this @JsonIgnore remove will cause recursive error. because you includes Viviendas has Usuarios list(set) and Usuarios has Viviendas list(set).

so if you want solve this; make another table and that table has two Class.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @JsonIgnore
  • User mentioned (0): @JsonIgnore
  • Low reputation (0.5):
Posted by: rodpold