Lombok.hashCode issue with “java.lang.StackOverflowError: null”

后端 未结 2 387
挽巷
挽巷 2020-12-28 13:48

I have two tables has one to one relationship as below:

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Book {
  @Id
  @GeneratedValue(stra         


        
2条回答
  •  太阳男子
    2020-12-28 14:16

    You have a circular dependency between book and bookdetails. You probably need to exclude book from BookDetail or bookDetail from Book.

提交回复
热议问题