change the names in doc because Steve didn't like fetching()/loading()

This commit is contained in:
Gavin 2023-05-23 15:45:49 +02:00 committed by Gavin King
parent dc1fe43f52
commit f330c85c16
1 changed files with 2 additions and 2 deletions

View File

@ -416,7 +416,7 @@ Hibernate has a better way:
----
var graph = session.createEntityGraph(Book.class);
graph.addSubgraph(Book_.publisher);
session.byId(Book.class).fetching(graph).load(bookId);
session.byId(Book.class).withFetchGraph(graph).load(bookId);
----
This code adds a `left outer join` to our SQL query, fetching the associated `Publisher` along with the `Book`.
@ -428,7 +428,7 @@ We may even attach additional nodes to our `EntityGraph`:
var graph = session.createEntityGraph(Book.class);
graph.addSubgraph(Book_.publisher);
graph.addPluralSubgraph(Book_.authors).addSubgraph(Author_.person);
session.byId(Book.class).fetching(graph).load(bookId);
session.byId(Book.class).withFetchGraph(graph).load(bookId);
----