JPA : How to define @NamedEntityGraph for 3 levels?
问题 I have 3 entities. Branch,Subject,Topic. Branch has list of subjects and Subject has list of topics. Also subjectList and topicList both are lazy. I want to fetch all branch including its subjects and topics in single query. 1. @Entity public class Branch implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; private String name; @OneToMany(mappedBy = "branch") private List<Subject> subjectList; /