How to handle Spring Boot/ Spring Data projections with entity relationships (nested projection)
问题 I'm trying to get nested projections working in Spring Boot. I have 2 entities, Parent and Child , wheras Parent has a unidirectional @OneToMany relationship to Child . Here are the classes: (using Lombok-Annotations) @Entity @Data @NoArgsConstructor public class Parent { @Id @GeneratedValue private long id; private String basic; private String detail; @OneToMany(fetch = FetchType.EAGER) private List<Child> children; public Parent(String basic, String detail, List<Child> children) { this