Fetch plan aka. fetch group aka. entity graph in QueryDSL
问题 I was unable to find any way of implementing fetch plans in QueryDSL, and I tried a lot. Can you provide me any hints? Also, do you know any better way of chosing which fields to fetch and which load lazily in different situations? I use batch fetching, therefore I can't use JOIN FETCH. 回答1: With an EntityGraph definition like this @NamedEntityGraph( name = "post", attributeNodes = { @NamedAttributeNode("title"), @NamedAttributeNode(value = "comments", subgraph = "comments") }, subgraphs = {