EclipseLink/Examples/JPA/GraphLoading
From Eclipsepedia
< EclipseLink | Examples | JPA
Contents |
How to Optimize Object Graph Loading with JPA
A common problem developers face when using object-relational solutions is how to optimize the loading of a graph or related objects. By default a query for the root object type and default navigation through the graph can result in a N+1 SQL performance problem. This how-to highlights EclipseLink JPA's available solutions.
Example Model
Querying without Optimizations
JPQL JOIN FETCH
EclipseLink Hints
EclipseLink provides additional support for joining and batch reading using query hints.