change the names in doc because Steve didn't like fetching()/loading()
This commit is contained in:
parent
4d3e2af68e
commit
27c3b34dcf
|
@ -416,7 +416,7 @@ Hibernate has a better way:
|
||||||
----
|
----
|
||||||
var graph = session.createEntityGraph(Book.class);
|
var graph = session.createEntityGraph(Book.class);
|
||||||
graph.addSubgraph(Book_.publisher);
|
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`.
|
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);
|
var graph = session.createEntityGraph(Book.class);
|
||||||
graph.addSubgraph(Book_.publisher);
|
graph.addSubgraph(Book_.publisher);
|
||||||
graph.addPluralSubgraph(Book_.authors).addSubgraph(Author_.person);
|
graph.addPluralSubgraph(Book_.authors).addSubgraph(Author_.person);
|
||||||
session.byId(Book.class).fetching(graph).load(bookId);
|
session.byId(Book.class).withFetchGraph(graph).load(bookId);
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue