0

Hello everybody, i have an execption in my mapper dto i have a relation between composition and member is a bidirectionnel relation.

@Getter
@Setter
public class CompositionDto implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    private Set<MembreDto> listMembre = new HashSet<>();

}


@Getter
@Setter
public class MembreDto   implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    private CompositionDto composition;

}

and my exception is :

Caused by: java.lang.StackOverflowError: null
  • 1
    Look here: https://stackoverflow.com/questions/36223752/prevent-cyclic-references-when-converting-with-mapstruct – Georgii Lvov Jul 30 '21 at 13:23
  • Does this answer your question? [Prevent Cyclic references when converting with MapStruct](https://stackoverflow.com/questions/36223752/prevent-cyclic-references-when-converting-with-mapstruct) – Filip Aug 08 '21 at 10:14

0 Answers0