Spring JPA bi-directional cannot evaluate toString

Remove toString method.

In case you are using Lombok:

Check you Entity/DAO class you might be using @Data annotation from lombok which by default includes getter and setters. Change it to @Getters and @Setter in case you need those and remove @Data annotation.


Well, my guess is that Registration.toString() prints the string representation of each payment in the list, and since Payment.toString() includes the string representation of Registration, Registration.toString() is called again, which in turn calls Payment.toString() again, and so on.

Try to return an empty string in Payment.toString() to see if the problem goes away.