It\'s my first question here on stack, so please be gentle :D
I\'m trying to create hibernate OneToMany relationship. When I try to fetch some data from my DB, I\'m
I had a very similar issue. I was using Lombok's @Data annotation on my model objects to auto-generate getters, setters, and other standard methods. I believe the toString() method generated by Lombok introduced a circular dependency between my Team and League objects. When I tried to get the Set from my League object, I got a java.lang.StackOverflowError because Spring was calling the toString method for logging purposes.
I resolved this by getting rid of Lombok's toString() method. I replaced the @Data annotation with Lombok's @Getter and @Setter annotations. That way I still could benefit from free getters and setters without getting the toString() method.